Welcome to Intel® Software Network Quick Login | Join | Help |
Search in Intel® Software Network Forums
in Go

IVF Compiler fixed format error - illegal character

Last post 05-07-2008, 7:59 AM by dobrien@cirrusdesign.com. 3 replies.
Sort Posts: Previous Next
 05-06-2008, 1:53 PM 30254226  

IVF Compiler fixed format error - illegal character

Is there a way to compile this program?

      PROGRAM HELLO
      WRITE(*,1)
 1 FORMAT('Hello World')
      END

ifort doesn't like the FOR in columns 4,5,and 6.  I have some source (hundreds of files) that is fixed format but labelled lines like format and continue don't start in column 7. 

Illegal character in statement label field.

thanks.

 
 05-06-2008, 2:06 PM 30254229 in reply to 30254226  

Re: IVF Compiler fixed format error - illegal character

The only way that our compiler would accept that as "fixed form source" (.f or .for file type) is if the character following the 1 was a tab and not a blank.  We support an extension called "tab source form" which you can look up in our documentation.

Otherwise, I would say that this is really a free-form source and should be compiled as such.  You can use /free as an option if the file type is wrong.

If you really have hundreds of files like this, then either they have been corrupted or are really free-form source with the wrong file type.  I don't know of any Fortran compiler that would accept this as fixed-form source.

Steve

Doctor Fortran: intel.com/software/drfortran
 
 05-06-2008, 2:10 PM 30254231 in reply to 30254226  

Re: IVF Compiler fixed format error - illegal character

I haven't tried but I am quite sure that you can compile your program using the /FREE option.

Regarding your other fixed format files with FORMAT and CONTINUE statements not starting in column 7 or beyond, I suspect that there is a horizontal tabulator character (HT, ASCII 9) being used at the beginning.
I know a compiler which accepts this and interprets HT as 8 characters, so this compiler would accept your sources. However if several HTs are used in a line of code, you might encounter the problem that the compiler tells you that this source line is too long (> 72 or > 132 characters, respectively).
I don't know how IVF is handling HTs. From your experience I guess that an HT is taken as one character.

Joerg Kuthe
www.qtsoftware.de

 
 05-07-2008, 7:59 AM 30254308 in reply to 30254231  

Re: IVF Compiler fixed format error - illegal character

Thanks for the replies.

It was my preprocessor.  The Makefile was calling cpp which was removing the extra spaces.  I changed the makefile to the Intel fpp for the preprocessor and it's working much better now.

By the way, free-format didn't work either because there were C's in the first column for comments instead of !'s.

 

 
View as RSS news feed in XML

Shortcuts


Tags For This Post

...

Community Tags

...