(j3.2006) finalizing undefined entities

Bill Long longb
Mon Mar 17 13:37:50 EDT 2008



Michael Ingrassia wrote:
> I'm sure we must have discussed this, but I am not finding a reference.
>
> Can undefined entities (i.e. entities with a definition status of Undefined)
> be finalized?  That seems to be required for example if an entity of
> finalizable type first appears as the variable in an intrinsic assignment
> statement.
>   

I think it would be reasonably common to have an object with some of its 
components defined and others not. Some of the allocatable components 
might be allocated and others not allocated. Such an object has to be 
handled correctly by its final routine.

> The activities prescribed for finalization seem to
> work better on defined entities.  I expect it will be the rare finalizer
> than can operate in a standard-conforming manner when its actual
> argument is undefined.  
>   

I'm sure some programmers will get it wrong at first.  I would expect to 
see statements that begin IF (ALLOCATED( ... or IF (ASSOCIATED ( pretty 
often in a robust final routine.

Cheers,
Bill



> 	--Michael I.
> _______________________________________________
> J3 mailing list
> J3 at j3-fortran.org
> http://j3-fortran.org/mailman/listinfo/j3
>   

-- 
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