gfortran 打开错误信息

gfortran open error messages

我好像记得 gfortran 中的 open 有可能 return iostat 的结果作为一个字符串,但是我忘记了 return 字符串的选项名称。

有人记得要使用的参数吗?

来自 ftp://ftp.nag.co.uk/sc22wg5/n1551-n1600/n1579.pdf

IOMSG= specifier: Any input/output statement is permitted to have an IOMSG= specifier. This identifies a scalar variable of type default character into which the processor places a message if an error, end-of-file, or end-of-record condition occurs during execution of the statement. If no such condition occurs, the value of the variable is not changed.