vidasll 发表于 2018-6-27 10:30:09

error #7938: Character length argument mismatch.

如题,之前可以编译,后来重新打开后一直无法编译,求助!

chiangtp 发表于 2018-6-27 13:20:08

https://stackoverflow.com/questions/4780069/passing-a-string-as-an-argument-when-the-dummy-has-specified-length

Fortran 2003, 12.4.1.2 Actual arguments associated with dummy data objects:
If a scalar dummy argument is of type default character, the length len of the dummy argument shall be less than or equal to the length of the actual argument. The dummy argument becomes associated with the leftmost len characters of the actual argument.

解決方法之一:
SUBROUTINE WALL( u, text, ...)
IMPLICIT NONE
CHARACTER(*), INTENT(IN) :: text
页: [1]
查看完整版本: error #7938: Character length argument mismatch.