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.
29280 Discussions

Explicit interface for structures and allocatable arrays

OP1
New Contributor III
805 Views

When a subroutine has a dummy array with the ALLOCATABLE attribute, an explicit interface is required.

If a subroutine has a dummy variable which is a user defined structure (TYPE(my_structure) for instance), and if one of this structure's component is an allocatable array, then no explicit interface is required.

Why is there a difference?

[BTW: these two features (allocatable dummy argument and allocatable structure component) are an extremely welcome addition to the Fortran language!!]

Olivier

0 Kudos
1 Solution
Steven_L_Intel1
Employee
805 Views

An allocatable array argument is always deferred-shape which requires an explicit interface so that the descriptor can be passed. For a derived type with allocatable components, it could be a fixed-shape array which does not require an interface.

View solution in original post

0 Kudos
2 Replies
Steven_L_Intel1
Employee
806 Views

An allocatable array argument is always deferred-shape which requires an explicit interface so that the descriptor can be passed. For a derived type with allocatable components, it could be a fixed-shape array which does not require an interface.

0 Kudos
OP1
New Contributor III
805 Views

An allocatable array argument is always deferred-shape which requires an explicit interface so that the descriptor can be passed. For a derived type with allocatable components, it could be a fixed-shape array which does not require an interface.

Thanks Steve!
0 Kudos
Reply