问题
如题,对于代码
1 logical a
2 a=1
3 write(*,'("nih hao 1",l4)')a
4 write(*,'("this is some different2")')a
5 end
运行时出现了如下错误:
forrtl: severe (105): there is no data-edit-descriptor to match a data-item in the I/O list, unit -5, file Internal Formatted Write
原因
没有加上对于逻辑变量a的描述,更改为
write(*,'("this is some different2",l4)')a