fortranformatfujitsu-fortran

Error 'Missing name' with intersection format and Lahey/Fujitsu Fortran compiler


I am using Lahey/Fujitsu Fortran 95 compiler for a fixed format code (.FOR) which has many include files. I am planning to change a couple of files to .F90 and would like to have include files with intersection format ( essentially fixed format with an ampersand at column 73 of any continued line, and with ampersand always used in column 6 for starting a continuation line).

But I am getting an error that the variable is not defined. Is there a reason intersection a format is not available for Lahey?

The same code if tested on GNU works fine. It will be nice if someone knows how to make it work in Lahey.

  PROGRAM MAIN
  IMPLICIT NONE
  INCLUDE 'test.inc'

  INTEGER*4 index1

  index1 =  1
  Varx   =  2
  Vary   =  3
  Varz   =  4
  Vara   =  5
  PRINT*,"Varx=",Varx

  END PROGRAM MAIN

test.inc

  REAL*4 Varx,Vary,Varz
  REAL*4 Vara
  COMMON /Varx/ Varx,Vary,                                          &
 &              Varz,                                               &
 &              Vara

Errors:

column 73: Missing name.
error 1110:  Missing name

Compiler Lahey/Fujitsu Fortran 7.7

Compiler Options


Solution

  • If the compiler gives this error with the very small code you show, then the compiler does not ignore the characters after character 73 an you cannot use the intersection format.

    Try to find some option in the manual that would persuade it to do so, but you might simply be unable to use the intersection format with this compiler.


    The Linux Lahey compiler manual states characters after character 72 should be ignored. If you do not observe such behaviour, you have to show us your exact compiler version, tell us how exactly you are using it, all compiler flags and check again that you are compiling exactly only those four lines you show above and nothing else.