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

Pointer

christian_rackl
Beginner
553 Views
Is it possible to set a pointer to a member-variable of a structure?
how?
0 Kudos
1 Reply
keefer
Beginner
553 Views
Yes, It is possible. The elements of the structure need to be defined as a derived type. A pointer is then declared as that type. If your structure is an array of these derived types, the simply assign the (already declared Pointer) to the element you want. You probably need to define a target,. such as the array.
Regards,
Keith
P.S. I am often wrong, but my reply should generate messages correcting me.
0 Kudos
Reply