我最近重拾Fortran,以前學的已經忘得差不多了。
我寫了一個f檔,內容如下:
program hello
C this program will ask name and say hello
character*25 NAME
WRITE(*,*) 'What is your name ?( no more than 25 characters)'
READ(*,*) NAME
WRITE(*,*) 'Hello!', NAME
WRITE(*,*) 'How are you?'
end
在putty上以gfortran hello.f執行(執行前我有確認過檔案權限),
卻得到以下結果:
hello.f:1.1:
program hello
1
Error: Non'numeric character in statement label at (1)
hello.f:1.1:
program hello
1
Error: Unclassifiable statement at (1)
類似的錯誤訊息後面還有好幾段,這裡就先省略了。
希望有高手能指點我一下,感謝!