forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ftn95 5.20 - ALLOCATABLE in TYPE

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
JohnMansell



Joined: 10 May 2006
Posts: 18
Location: Darlington

PostPosted: Mon Mar 17, 2008 11:12 am    Post subject: ftn95 5.20 - ALLOCATABLE in TYPE Reply with quote

Use of ALLOCATABLE in TYPE declaration is now tolerated though not standard conforming. Er, tell us some more. Is this not TR15881?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7912
Location: Salford, UK

PostPosted: Mon Mar 17, 2008 4:52 pm    Post subject: Reply with quote

FTN95 aims to conform to the 95 Fortran standard.
It has bits of Fortran 2003 but does not currently aim to conform to this standard.

If this feature is included in the 2003 standard then all well and good.
It means that others have thought about this and see no inconsistency.
Back to top
View user's profile Send private message AIM Address
wws



Joined: 25 Oct 2007
Posts: 7
Location: California

PostPosted: Fri Apr 25, 2008 9:47 pm    Post subject: Re: Reply with quote

PaulLaidler wrote:
FTN95 aims to conform to the 95 Fortran standard.
It has bits of Fortran 2003 but does not currently aim to conform to this standard.

If this feature is included in the 2003 standard then all well and good.
It means that others have thought about this and see no inconsistency.


Paul: Allowing ALLOCATABLE in derived types is a F2003 feature, and was also described in the TR 15581 as an addendum to F95. This is a highly desirable feature, and would be great if you supported the entire TR. (The TR also adds ALLOCATABLE dummy args, ALLOCATABLE function results, and a couple of other related things.)

Note that ALLOCATABLE differs from POINTER because the compiler should arrange for automatic deallocation of memory when an ALLOCATABLE object goes out of scope. This guarantees there will be no memory leakage. With pointers, the onus is on the user to avoid memory leakage.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7912
Location: Salford, UK

PostPosted: Sat Apr 26, 2008 7:53 am    Post subject: Reply with quote

I have already implemented this recommendation although it looks like I forgot to report this in the orginal thread in the forum.

I will check out the automatic deallocation issue - thank you.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group