- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I wrote the next basic simple code:
PROGRAM Temp_Conversion
IMPLICIT ONE
INTEGER :: Deg_F, Deg_C, K
PRINT*, "Please type in the temp in F"
READ*, Deg_F
Deg_C = 5*(Deg_F-32)/9
PRINT*, "This is equal to", Deg_C, "C"
K = Deg_C + 273
PRINT*, "and", K, "K"
END PROGRAM Temp_Conversion
and i tried to complile with
>ifort conversion.f
But generate the following error, many lines like this:
fortcom: Error: Illegal character in statement label field
fortcom: Error: Illegal character in statement label field
fortcom: Error: Illegal character in statement label field
fortcom: Error: Illegal character in statement label field
fortcom: Error: Illegal character in statement label field
fortcom: Error: First statement in file must not be continued
fortcom: Error: first.f, line 2: Illegal character in statement label field
IMPLICIT ONE
----^
fortcom: Error: first.f, line 2: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( : %
IMPLICIT ONE
-----------------^
fortcom: Error: first.f, line 10: Syntax error, found IDENTIFIER 'NDPROGRAMTEMP_CONVERSION' when expecting one of: .EQV. .NEQV. .XOR. .OR. .AND. .LT. < .LE. <= .EQ. == .NE. /= .GT. > ...
END PROGRAM Temp_Conversion
------^
fortcom: Error: first.f, line 10: Syntax error, found END-OF-FILE when expecting one of:
PROGRAM Temp_Conversion
IMPLICIT ONE
INTEGER :: Deg_F, Deg_C, K
PRINT*, "Please type in the temp in F"
READ*, Deg_F
Deg_C = 5*(Deg_F-32)/9
PRINT*, "This is equal to", Deg_C, "C"
K = Deg_C + 273
PRINT*, "and", K, "K"
END PROGRAM Temp_Conversion
and i tried to complile with
>ifort conversion.f
But generate the following error, many lines like this:
fortcom: Error: Illegal character in statement label field
fortcom: Error: Illegal character in statement label field
fortcom: Error: Illegal character in statement label field
fortcom: Error: Illegal character in statement label field
fortcom: Error: Illegal character in statement label field
fortcom: Error: First statement in file must not be continued
fortcom: Error: first.f, line 2: Illegal character in statement label field
IMPLICIT ONE
----^
fortcom: Error: first.f, line 2: Syntax error, found END-OF-STATEMENT when expecting one of: => = . ( : %
IMPLICIT ONE
-----------------^
fortcom: Error: first.f, line 10: Syntax error, found IDENTIFIER 'NDPROGRAMTEMP_CONVERSION' when expecting one of: .EQV. .NEQV. .XOR. .OR. .AND. .LT. < .LE. <= .EQ. == .NE. /= .GT. > ...
END PROGRAM Temp_Conversion
------^
fortcom: Error: first.f, line 10: Syntax error, found END-OF-FILE when expecting one of:
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ifort defaults to fixed format (f77 style) for file suffix .f, as do many Fortran compilers. You could rename it to .f90, or add the option -free or -FR to over-ride this default.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks a lot...

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page