一个有关Fortran程序的问题,部分程序1001 FORMAT(4I5)1002 FORMAT(6X,'TOTAL NUMBER OF FILMENTS' 15/& 24X,'NOODES=',I5/25X,'LOADS-',I5/22X,'FIXITIES'I5)1003 FORMAT(/5X,'ELEMENT DEFINITIONS'/& 5X,'ELEMENT',2X,'NOOD1',2X,'NOOD2',2N/)1004 FORMAT(3I5)1005 FORMAT(5X,I5,3 2X,I5)1006 FORMAT(/5X,'NOODL COORL IHATES'/& 5X,'NOOD',6X,1HX,9X,IHY/)1007 FORMAT(T5,2F10.8)1008 FORMAT(5X,2F10.3)1009 FORMAT(/5X,'APPLIED LOADS AND FIXITIES'/& 5X,'NOOD',5X,'APPLIED LOADS',8X,'FIXITIES'/)错
一个有关Fortran程序的问题,
部分程序
1001 FORMAT(4I5)
1002 FORMAT(6X,'TOTAL NUMBER OF FILMENTS' 15/
& 24X,'NOODES=',I5/25X,'LOADS-',I5/22X,'FIXITIES'I5)
1003 FORMAT(/5X,'ELEMENT DEFINITIONS'/
& 5X,'ELEMENT',2X,'NOOD1',2X,'NOOD2',2N/)
1004 FORMAT(3I5)
1005 FORMAT(5X,I5,3 2X,I5)
1006 FORMAT(/5X,'NOODL COORL IHATES'/
& 5X,'NOOD',6X,1HX,9X,IHY/)
1007 FORMAT(T5,2F10.8)
1008 FORMAT(5X,2F10.3)
1009 FORMAT(/5X,'APPLIED LOADS AND FIXITIES'/
& 5X,'NOOD',5X,'APPLIED LOADS',8X,'FIXITIES'/)
错误是
C:\vf -1\1.for(117) :Error:This character is not valid in a format list.[H]
1006 FORMAT(/5X,'NOODL COORL IHATES'/
^
C:\vf -1\1.for(117) :Error:This character is not valid in a format list.[Y]
1006 FORMAT(/5X,'NOODL COORL IHATES'/
^
C:\vf -1\1.for(113) :Error:This character is not valid in a format list.[N]
1003 FORMAT(/5X,'ELEMENT DEFINITIONS'/
问题1:
1006 FORMAT(/5X,'NOODL COORL IHATES'/
& 5X,'NOOD',6X,1HX,9X,IHY/)
这里的 IHY 是否应该是 1HY ?
问题2:
1003 FORMAT(/5X,'ELEMENT DEFINITIONS'/
& 5X,'ELEMENT',2X,'NOOD1',2X,'NOOD2',2N/)
这里的 2N 非法,Fortran里没有 N 编辑符.是否应该是 2X ?
PS:建议不要使用 H 编辑符,在新语法里,这个编辑符被弃用了.