|
网站课程语法之文件读写上中有这样一个程序
[Fortran] 纯文本查看 复制代码 04 | Real , allocatable :: a ( : , : ) |
05 | Character ( len = 512 ) :: cStr |
07 | integer :: FILE_IN , i , nRow , nCol |
08 | Open ( NewUnit = FILE_IN , File = "text.txt" ) |
09 | nRow = GetFileN ( FILE_IN ) - 2 |
12 | Read ( FILE_IN , '(a512)' ) cStr |
13 | nCol = GetDataN ( cStr ) - 1 |
14 | write ( * , '("Row:",g0," Col: ",g0)' ) nRow , nCol |
15 | Allocate ( a ( nCol , nRow ) ) |
18 | Read ( FILE_IN , * ) r , a ( : , i ) |
23 | End Program www_fcode_cn |
请问其中write( *, '("Row:",g0," Col: ",g0)' ) nRow , nCol中g0是什么输出格式,我找到format中与之对应的格式是Gw.d其中d不能省略,我把g0改成g1之后报错了,所以不明白g0是什么输出格式
希望大家能为我这个新人答疑解惑
|
|