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

Error in XE12 compile

Earl_Geddes
New Contributor I
958 Views
When I use the intrinsic function DABS on a complex(8) variable the compiler tells me:

C:\\Users\\erg\\Documents\\Visual Studio 2010\\Projects\\Meas\\Dll1\\Hankel.f90(13): warning #7319: This argument's data type is incompatible with this intrinsic procedure; procedure assumed EXTERNAL. [DABS]

C:\\Users\\erg\\Documents\\Visual Studio 2010\\Projects\\Meas\\Dll1\\Hankel.f90(13): error #6404: This name does not have a type, and must have an explicit type. [DABS]

When I use ABS it compiles just fine.

No matter how the complex variable is declared this error results.

0 Kudos
4 Replies
Jugoslav_Dujic
Valued Contributor II
958 Views
That's because DABS is specific for REAL(8), and ABS is generic (i.e. it overloads several specific types). For complex(8), you can use CDABS, but in my opinion ABS is highly preferred.

The only place where you must use specific rather than generic is fairly obscure: it is when you pass the intrinsic routine itself as an actual argument to an EXTERNAL dummy.
0 Kudos
Earl_Geddes
New Contributor I
958 Views
Thanks, but then the help is incorrect because I looked up DABS and it says that complex is an option. But you are right that I should stick to the generic function.
0 Kudos
Les_Neilson
Valued Contributor II
958 Views
Quoting Earl Geddes
Thanks, but then the help is incorrect because I looked up DABS and it says that complex is an option.

Not on the Intel help that I am looking at.

Les
0 Kudos
Steven_L_Intel1
Employee
958 Views
The only reference to DABS I can find in the Intel documentation shows DABS as a specific name that takes a REAL(8) argument only. Earl, where do you see something different?
0 Kudos
Reply