Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有趣的是,由于某种原因,我在整个职业生涯中从未遇到过这个问题,但我无法使用READ(9,*)STRING, where STRINGis CHARACTER*nto work。
READ(9,*)STRING
STRING
CHARACTER*n
原因是,逗号在输入中分隔字符串,而其他字符也可能会做可怕的控制事情。我只是想阅读整个 CRLF。当然有办法做到这一点?
是的。您需要在读取时使用字符格式描述符:
READ(UNIT=9,FMT='(A)')STRING