Automatic allocation of allocatable components of a type

opmkl
Total Points:
2,115
Status Points:
1,615
Brown Belt
June 30, 2009 3:22 PM PDT
Rate
 
#2 Reply to #1
This is correct and a feature of Fortran 2003.

Another related feature of Fortran 2003 is for allocatable arrays, where you could say:

integer, allocatable, dimension(:) :: a

a = [3,4,5]
and a would get automatically allocated to the proper shape, deallocating any previous allocation.  In Intel Fortran, this behavior is NOT the default and requires an option /assume:realloc_lhs.   However, the use you described with the derived type components does not require the option.

wOW...  That's very neat. Thanks a lot Steve.

Olivier

Intel Software Network Forums Statistics

8488 users have contributed to 31626 threads and 100733 posts to date.
In the past 24 hours, we have 35 new thread(s) 132 new posts(s), and 199 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member chat1983