invalid character name at (1)

前端 未结 2 486
情深已故
情深已故 2021-01-26 12:40

I am trying to compile a fortran code. It will analyze an X file in an Y directory and then create a new file Z with the results. But there is something wrong occurring.

2条回答
  •  长情又很酷
    2021-01-26 12:55

    Adding to High Performance Mark's answer:

    If you continue with FORTRAN 77, most compilers have an option to increase the allowed line length, e.g., -ffixed-form -ffixed-line-length-none for gfortran. As already stated, Fortran >=90 has line length of 132, so you wouldn't need to split the line.

    Finally, if you want to split the line in Fortran >=90, you need two ampersands. In most cases you need one, but to split a string you need two:

    namech='/home/matheus/Documents/UFABC/IC/Spectra/Elliptical/&
    &espec.fits'
    

提交回复
热议问题