syntax error on 4.9.2

W Spector w6ws@earthlink.net
Fri Nov 18 17:03:00 GMT 2016


> gfortran -ffree-form -ffree-line-length-0 -ff2c -fno-second-underscore
> -I/opt/fftw-3.3.5/include -O3 -c xml.f90 -I/opt/openmpi-2.0.1/include
> -pthread -I/opt/openmpi-2.0.1/lib
> xml.F:641.46:
>
>            CALL XML_TAG("set", comment="spin "
>                                               1
> Error: Syntax error in argument list at (1)
> xml.F:644.51:
>
>               CALL XML_TAG("set", comment="kpoint "

The answer to the question is that the name of the source file ends in 
.F - which indicated the source code will be pre-processed.  The line in 
question uses string concatenation ("//") - which begins an in-line 
comment in C/C++.  So the pre-processor is trimming off a portion of the 
line before gfortran ever sees it.

Walter



More information about the Fortran mailing list