问题
I have checked all the formats of the implicit type declaration but have not been able to find out the error in the following line . I have been running the code using f77 to compile this.
implicit real*4 (a-h,o-z)
while running the program it gives the following error for the above statement.
implicit real*4 (a-h,o-z)
1
Error: Unexpected character in variable list at (1)
回答1:
A few basic rules if you are using F77 or earlier versions.
- Put the implicit line first
- Columns 1-5 are for labels
- Column 6 is for continuation
- Start the code in column 7
- The code should not go past column 72. Some compilers have an option to extend the line length to 80 or 120 or 132 (widths of line printers when F77 first came out)
If you wish to use free format, use one of the later versions of fortran
来源:https://stackoverflow.com/questions/32109427/error-in-implicit-declaration-in-fortran