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

Type KIND of PARAMETER lost when used as TRANSFER MOLD

Espen_M_
Beginner
393 Views

The following two statements does *not* produce the same result:

[fortran]

PRINT *, KIND( TRANSFER(real_num,equal_size_int) )

PRINT *, KIND( equal_size_int )

[/fortran]

where equal_size_int is a PARAMETER accessed through a MODULE.

This must be an error...

0 Kudos
3 Replies
Steven_L_Intel1
Employee
393 Views

Did you perhaps mean to write:

TRANSFER(real_num,0_equal_size_int)

? What you have is just an integer whose value is equal_size_int with default kind.

0 Kudos
Espen_M_
Beginner
393 Views

equal_size_int is the name of the integer parameter, it can have any value and is not intended as a kind parameter (which would have to have the values 1, 2, 4 or 8 in IFORT)

But regardless of that, shouldn't the two statements produce the same result?

0 Kudos
Steven_L_Intel1
Employee
393 Views

Please show me a complete source that demonstrates the problem. I can't see it from those two lines.

0 Kudos
Reply