fortran - Unclassifiable statement at 1 , Non-numeric character in statement label at 1 -
i'm totally new fortran, , want write test program using real*8
function called nequick
, i've written following program :
program test implicit real*8 (a-h,o-z) ane=nequick(400.0d0,45.0d0,15.0d0,10,1.929d2,15.0d0) write(6,'(a,e12.5,a)') & ' nequick electron density =',ane,' m^-3' call sleep(10) end program
at end when compile have following errors in each line of little program : -non-numeric character in statement label @ 1 or -unclassifiable statement @ 1
can guys please explain me what's wrong program ?
the way code written tells me intended fixed-form source. requires of code start in column 7, except & in second line of write statement should in column 6. when such code pasted editor, leading blanks removed. if this, though, have rename source file have .f or .for file type compiler knows fixed-form.
another, perhaps easier solution put & @ end of first line of write - make source have valid free-form.
for perspective on this, please read source form wants free.
Comments
Post a Comment