这是我的data长样:
2012/xx/xx abcdefgxxxxxxxxxxx(表示有问字叙述)
abcdefgxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
12 1234 4567
55 4321 7654
.. .... ....
.. .... ....
.. .... ....
^^^ ^^ ^^
档案中"^"表示有空白的存在
目前已经试过下列方法:
open(unit=10, file='filename.txt')
100 format(2/,5X,I6)
200 format(I6)
read(10,100) a
write(*,200) a
程式码中黄色的2字可以成功跳过2012/xx/xx以及文字叙述那两列
但因为某些需求黄色文字的部分想要用一个变量取代
就像是
E=12
100 format(E/,5X,I6)
但执行结果他都要求我必须以一个constant or general expreesion
来表示我大写E的部分
请求解...............QQ
PS:我有试过另一个方法用open(access='direct',recl=?)
问号的部分我不知道到底要用什么长度分才正确..........