Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Type KIND of PARAMETER lost when used as TRANSFER MOLD

Espen_M_
Beginner
666 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
666 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
666 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
666 Views

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

0 Kudos
Reply