fortran - What's wrong with my line continuation syntax? -
in project i've been assigned i'm asked compile code f77, , i'm trying grip on how handle 72 characters per line limit. i'd write following line of code:
!use numbers check indentation... !2345678901234567890 mpi_send(slave, 1, mpi_integer, slave, mpi_any_tag, mpi_comm_world, ierr)
the long indentation before because line inside couple of blocks, , i'd solve without having sacrifice code indentation (i.e. readability).
as is, code truncated after mp
in mpi_comm_world
, thought i'd break line, , add line continuation character in column 6. i've seen examples on net both +
, integer digits line continuation characters, i've tried both following versions:
!2345678901234567890 mpi_send(slave, 1, mpi_integer, slave, mpi_any_tag, 1 mpi_comm_world, ierr) mpi_send(slave, 1, mpi_integer, slave, mpi_any_tag, + mpi_comm_world, ierr)
both of them give me compile error on first line, saying
mpi_send(slave, 1, mpi_integer, slave, mpi_any_tag, 1 error: unclassifiable statement @ (1)
the code resides in code file named pi.f
, i'm compiling make pi
, have (only) following in makefile:
fc = mpif77 fflags=-wall
make shows me actual command compile file is
mpif77 -wall pi.f -o pi
what doing wrong here? how make work?
before worrying line continuation syntax issues may (or may not) have, suggest attend error message compiler. mpi_send
subroutine, not function nor command, it's use should preceded keyword call
.
Comments
Post a Comment