编译时出现如下报错。
star2doc.f:358.39: READ(CTOKEN(1:NCHAR),'(I)') IDLIST 1 Error: Nonnegative width required in format string at (1) make: *** [spider_linux_gfort.a(star2doc.o)] Error 1
标准Fortran中要求字符指定非负的位宽,未指定情况下使用GFortran编译会报错。在Intel Fortran扩展中支持不会报错。
详情请参考:
https://pages.mtu.edu/~shene/COURSES/cs201/NOTES/chap05/format.html
将“READ(CTOKEN(1:NCHAR),'(I)') IDLIST”修改为“READ(CTOKEN(1:NCHAR),'(I5)') IDLIST”。