Software Archive
Read-only legacy content
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.
17060 Discussions

Allocatable arrays in types

lucaletizia
Beginner
864 Views
Hi,

I would like to know whether the FORTRAN 6.6A patch allows to have an allocatable array in a user defined type .
So far the only way of allocate the dimension of an array in a type at run time was to use Pointer, Dimension, but it gives some problems when communicating with C++

Thanks Luca
0 Kudos
3 Replies
Steven_L_Intel1
Employee
864 Views
Yes, it does, but you'll have the same problem in that the descriptor used is the same as for POINTER.

Steve
0 Kudos
Jugoslav_Dujic
Valued Contributor II
864 Views
We use Cray (Integer) Pointers for just that purpose, which are basically the same as C pointers [and declare structure members as INTEGER(PTR_KIND) -- there's now intrinsic IIRC SELECTED_PTR_KIND()]. The code for accessing is not so elegant but it better fits to C++ than tweaking array descriptors on C++ side.

Jugoslav
0 Kudos
Steven_L_Intel1
Employee
864 Views
INT_PTR_KIND is the intrinsic.

Steve
0 Kudos
Reply