用fortran 90 编译器编译fortran 77源码出错,请指点。

来源:百度知道 编辑:UC知道 时间:2024/09/22 10:40:08
double precision function rlimit(x)
implicit double precision (a-h,o-z)
rlimit=max(0,min(1.d0,2.d0*x),min(2.d0,x))
end

用fortran 90 编译器编译上述fortran 77源码时,出现如下错误提示
......\Source1.F90(864) : Error: The intrinsic data types of the arguments must be the same. [MAX]
......\Source1.F90(864) : Error: The intrinsic data types of the arguments must be the same. [MIN]

不知何故,请高手指点~~~

max和min这两个函数传入的参数类型不对,你检查一下传入参数的类型是不是和函数内部定义的类型相同

内在的数据类型参数必须是相同的

参数不匹配,

可能是编译器版本的问题,第864行的代码改改吧。