- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why I have these errors?
Almost all lines in the programare generate errors.
My Complier: Intel visual fortran 11.1 professional, 64 bit
My system: Window XP 64bit
*********************Error Messages***************************************************
: error #5149: Illegal character in statement label field
: error #5149: Illegal character in statement label field
: error #5149: Illegal character in statement label field
: error #5149: Illegal character in statement label field
: error #5149: Illegal character in statement label field
: error #5118: First statement in file must not be continued
mean.for<7>: error #5149:Illegal character in statement label field
---IMPLICT NONE
.
.
.
*********************Fortran Example Code*************************************************
! ----------------------------------------------------------
! This program contains one subroutine for computing the
! arithmetic, geometric and harmonic means of three REALs.
! ----------------------------------------------------------
PROGRAM Mean6
IMPLICIT NONE
REAL :: u, v, w
REAL :: ArithMean, GeoMean, HarmMean
READ(*,*) u, v, w
CALL Means(u, v, w, ArithMean, GeoMean, HarmMean)
WRITE(*,*) "Arithmetic Mean = ", ArithMean
WRITE(*,*) "Geometric Mean = ", GeoMean
WRITE(*,*) "Harmonic Mean = ", HarmMean
CONTAINS
! ----------------------------------------------------------
! SUBROUTINE Means():
! This subroutine receives three REAL values and computes
! their arithmetic, geometric, and harmonic means.
! ----------------------------------------------------------
SUBROUTINE Means(a, b, c, Am, Gm, Hm)
IMPLICIT NONE
REAL, INTENT(IN) :: a, b, c
REAL, INTENT(OUT) :: Am, Gm, Hm
Am = (a + b + c)/3.0
Gm = (a * b * c)**(1.0/3.0)
Hm = 3.0/(1.0/a + 1.0/b + 1.0/c)
END SUBROUTINE Means
END PROGRAM Mean6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The file is most likely in what is known as free source form. Try again after changing the file extension to ".f90" and see what happens.
Have a look in the index for the help for the compiler under "Source forms" and also at the help for the associated compiler options /free and /fixed for more information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The file is most likely in what is known as free source form. Try again after changing the file extension to ".f90" and see what happens.
Have a look in the index for the help for the compiler under "Source forms" and also at the help for the associated compiler options /free and /fixed for more information.
THANK YOU.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
THANK YOU.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page