求fortran Error:Not a valid value for the char-expr in this c

求fortran Error:Not a valid value for the char-expr in this connect-spe怎么解决?
for(13) :Error:Not a valid value for the char-expr in this connect-spec.['readonly']
13行是这句 open (unit=1,file='d:cmapcmap_mon_v1101_79.txt',
access='sequential',status='readonly',form='formatted')
Error:Constants and expressions are invalid in read-only I/O lists.[RLONRAIN1]
银池雪虎 1年前 已收到1个回答 举报

613sc_jyf 幼苗

共回答了17个问题采纳率:76.5% 举报

status
Character*(*).Describes the nature of the file to be opened.Can be one of the following:
●'OLD' The file must already exist.If the file exists,it is opened.If it does not exist,an I/O error occurs.
●'NEW' The file must not already exist.If the file does not exist,it is created.If it exists,an I/O error occurs.
●'SCRATCH' If you omit the file parameter when opening a file,the value of status defaults to 'SCRATCH'.Scratch files are temporary.They are deleted when the unit is closed or when the program terminates.
●'REPLACE' The file opened replaces one of the same name.If there is no existing file of the same name,a new file is created.
●'UNKNOWN' (Default) The run-time system first attempts to open the file with status equal to 'OLD',and then with status equal to 'NEW'.If the file exists,it is opened; if it does not exist,it is created.
●Using STATUS= 'UNKNOWN' avoids any run-time errors associated with opening an existing file using STATUS='NEW' or opening a nonexistent file using STATUS='OLD'.
x05Values of status affect only disk files,and are ignored for devices such as the keyboard or the printer.
没有发现'readonly'这个选项.

1年前

2
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 16 q. 2.079 s. - webmaster@yulucn.com