Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

no compile a basic program

raulepuebla
Beginner
474 Views
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:

0 Kudos
2 Replies
TimP
Honored Contributor III
474 Views
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.
0 Kudos
raulepuebla
Beginner
474 Views
thanks a lot...
0 Kudos
Reply