作者sjgau (sjgau)
看板Fortran
标题Re: F90 的 "hello, world!"
时间Tue Sep 9 09:24:02 2008
! CF0610.f90
! 这行是 注解
! -----------------------------------------------
!dec$if (.false.)
这里是 段落式的 注解,注解很重要
Hello World -1294967296
Press any key to continue
! c > +2147483647, 会得到错误的答案,而且没有提供
! 任何 compile 和 runtime 的错误或是 警告讯息
!dec$endif
! -----------------------------------------------
program CF0610
implicit none
integer a, b, c
a= 50000
b= 60000
c= a*b
print *, 'Hello World', c
! c > +2147483647, 会得到错误的答案,而且没有提供
! 任何 compile 和 runtime 的错误或是 警告讯息
end program CF0610
※ 引述《sjgau (sjgau)》之铭言:
: ! 如果 a= 50000, b= 60000, c= a*b
: ! 会得到 错误的答案
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 118.231.128.31