【发布时间】:2017-10-04 07:57:37
【问题描述】:
我正在尝试读取这一行中的整数:
# 14 14 10
在 Fortran 2008 中。
我尝试使用此代码:
read(21, "(A, I,I,I)") garbage, a, b, c
但这不符合标准。 Intel Fortran 发出警告“Fortran 2008 does not allow this edit descriptor. [I]”和其他问题解释了这个问题:Nonnegative width required in format stringError: Nonnegative width required in format string at (1)
如何使用 Fortran 2008 正确读取未知宽度的整数?我不能简单地指定I2,因为我事先并不知道整数的宽度。
【问题讨论】:
标签: fortran fortran2008