(j3.2006) Finalization ordering question

Bill Long longb
Thu Oct 11 19:04:24 EDT 2007

Suppose you have a base type, t, with a finalizable component, ft.  And 
a type, e, that extends type t and  has a finalizable component fe.  If 
you have an array type(e) :: x(3) and it is finalized, the recipe in seems to say the finalizations has to be done in this order:

Step 2:  x(1)%fe,  x(2)%fe, x(3)%fe
Step 3:  x(1)%ft,  x(2)%ft,  x(3)%ft

Is there a reason why the (potentially more efficient) order:

x(1)%fe, x(1)%ft, x(2)%fe, x(2)%ft, x(3)%fe, x(3)%ft

is not allowed?  In other words, allowing step 3 to be mixed in with 
step 2 for each element.


Bill Long                                   longb at cray.com
Fortran Technical Support    &              voice: 651-605-9024
Bioinformatics Software Development         fax:   651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120


More information about the J3 mailing list