(j3.2006) Finalizing subroutines question

Bill Long longb
Fri May 23 15:02:41 EDT 2008



Aleksandar Donev wrote:
> On Friday 23 May 2008 11:19, Jim Xia wrote:
>   
>> But how do you finalize this
>>
>> obj[i] = local_obj
>>
>> obj[i] will get finalized, right?
>>     
> No. Finalization occurs during intrinsic assignment only when deallocation is 
> involved. 

Really?  I thought it was only when the type of the variable has a final 
routine specified.  f03:[59:33-34].

We put in words to exempt coindex object components from automatic 
reallocation, since allocating/deallocating memory on a different image 
is not allowed.  In a subroutine you are not allowed to alter the 
pointer association status or allocation status of a component of a 
dummy that corresponds to a coindexed actual argument.   That should 
pretty severely limit what the user could put into a FINAL routine and 
still have it callable with a coindexed argument.

I suspect that when users realize what an enormous hammer FINAL routines 
are, they will just not specify them.

Cheers,
Bill



> Such deallocation does not occur for co-indexed objects, as ensured 
> by the rules in the beginning of the Intr. Ass. clause.
> Before we start any apocalyptic threads: some of us have more important stuff 
> to do than argue the same loops again.
> Thanks,
> Aleks
> _______________________________________________
> 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