Fortran1小时入门教程.pdf
《Fortran1小时入门教程.pdf》由会员分享,可在线阅读,更多相关《Fortran1小时入门教程.pdf(19页珍藏版)》请在冰点文库上搜索。
HowToAskQuestionsInTheSmartWay1.?
2.?
(?
Google)“?
”?
”CUITCUITXYLSFORTRANCUITXYLS?
FORTRAN?
1FortranPowerStation4.0XPWIN7?
2CompaqVisualFortran6.5(CVF)XPWIN7?
MicrosoftVisualStudio2005(VS2005)MicrosoftVisualStudio2008(VS2008)3InterVisualFortranv11(IVF)XPWIN7?
CUITXYLSUltraEdit?
CUITCUITXYLSEditPlus?
CUITCUITXYLS?
123?
CUITXYLS?
if?
case?
if?
if?
.and.or.not.CUITXYLSQ1?
60?
if?
if(?
)then?
endifQ2?
7090?
if?
if(?
)then?
1else?
2endif?
if?
if(?
1)then?
1elseif(?
2)then?
2elseif(?
3)then?
3elseif(?
n)then?
nelse?
n+1endifCUITXYLScase?
selectcase(?
)case(?
1)?
1case(?
2)?
2case(?
n)?
ncasedefault?
endselect?
if?
if(?
)?
if?
if(?
)?
1?
2?
3CUITXYLS?
12dowhile?
do?
CUITCUITXYLSQ:
?
110?
do?
do?
doi=e1,e2,e3?
enddodowhile?
dowhile(?
)?
enddoexitcyclepausedo?
dowhile?
CUITXYLS?
CUITXYLS?
FORTRAN90?
A
(1)A
(2)A(3).A(n)A(1,1)A(1,2)A(1,3)A(2,1)A(2,2)A(2,3)A
(1)A
(2)A(3)A(n)?
A(1,1)A(2,1)A(1,2)A(2,2)A(1,3)A(2,3)1352461234561?
2?
3?
1:
m?
CUITXYLS?
deallocate(ave)?
allocate(ave(m,n)?
real,dimension(:
:
),allocatable:
aveCUITXYLS?
open?
CUITXYLS?
ASCII?
CUITXYLS?
open(unit,file,form,access,recl)open(11,file=d:
datab.txt,form=formatted,access=direct,recl=10)open(10,file=d:
dataa.txt,form=formatted,access=sequential)?
close(10)close(11)close(unit)CUITXYLS?
formatted?
unformatted?
binary?
sequential?
direct?
/?
read(10)/write(10)read(10,*)/write(10,*)CUITXYLS?
CUITCUITXYLS