Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

ifort cannot recognize SHORT(x)

changks888
Beginner
580 Views
Dear all,
I am compiling a program that was compiled/tested in gfortran. Evertything is fine, but I got some errors about "error #6404: This name does not have a type, and must have an explicit type. [SHORT]"
If I change the statement from "SHORT(x)" to "x", the model has be compiled using ifort.
For example, in the original statement isSHORT(3), then I changeSHORT(3) to 3. The program can be compiled.
** original statement that cannot be compiled using ifort
if (inpoly(sandy, SHORT(3), msand, mclay)) then
textcls = 1
endif
** new statement, but model shows some errors becuase of the format
if (inpoly(sandy, 3, msand, mclay)) then
textcls = 1
endif
The original program has used byte (INTEGER*1) format to store values in these statements. The error shows:
2916 probable invalid data values found in input array tmin
[Specified range was Max: 50.0000 Min: -80.0000]
In time step 1 at map coordinates ( 471 N, 305 E) tminvalue is -327.6800
In time step 1 at map coordinates ( 468 N, 311 E) tminvalue is -327.6800
...
What can I do for this issue? Please advise me. Thank you.
Micahel
0 Kudos
1 Reply
Steven_L_Intel1
Employee
580 Views
SHORT is not a standard intrinsic. I would suggest using 3_1 to mean an integer 3 of kind 1. You could also use INT(3,1) or INT1(3) - the last is non-standard as well.

It is not clear to me how this would make a difference in the program, assuming there is no explicit interface for function inpoly, as it is harmless to pass the "default integer" constant 3 to a routine that expects it as INTEGER(1). You'll need to dig further to see what is causing the run-time problem.
0 Kudos
Reply