主题:[讨论]77与90下简单的小程序一点问题
1. program ex0510
2. implicit none
3. real:: a
4. real:: b=4.0
5. real,parameter::e=0.0001!设置误差范围
6.
7. a=sqrt(b)**2-b
8.
9. if(abs(a-0.0)<=e) then
10. write(*,*) "a=0"
11. else
12. write(*,*) "a/=0"
13. end if
14.
15. stop
16. end
--------------------Configuration: 88 - Win32 Debug--------------------
Compiling Fortran...
C:\MSDEV\Projects\88\Text2.f90
C:\MSDEV\Projects\88\Text2.f90(1): error FOR3852: syntax error
C:\MSDEV\Projects\88\Text2.f90(1): error FOR1768: missing END statement or missing program unit (possibly free-form source in fixed-form file)
Error executing fl32.exe.
Text2.obj - 2 error(s), 0 warning(s)
我刚学习。一开始学的是77,但用90运行的这个小程序有问题(在书上抄的)。我又用77写了下,77下没问题
我想问下什么原因啊,是不是90的有些问题我没注意呢?
[em1]
2. implicit none
3. real:: a
4. real:: b=4.0
5. real,parameter::e=0.0001!设置误差范围
6.
7. a=sqrt(b)**2-b
8.
9. if(abs(a-0.0)<=e) then
10. write(*,*) "a=0"
11. else
12. write(*,*) "a/=0"
13. end if
14.
15. stop
16. end
--------------------Configuration: 88 - Win32 Debug--------------------
Compiling Fortran...
C:\MSDEV\Projects\88\Text2.f90
C:\MSDEV\Projects\88\Text2.f90(1): error FOR3852: syntax error
C:\MSDEV\Projects\88\Text2.f90(1): error FOR1768: missing END statement or missing program unit (possibly free-form source in fixed-form file)
Error executing fl32.exe.
Text2.obj - 2 error(s), 0 warning(s)
我刚学习。一开始学的是77,但用90运行的这个小程序有问题(在书上抄的)。我又用77写了下,77下没问题
我想问下什么原因啊,是不是90的有些问题我没注意呢?
[em1]