Silverfrost Forums

Welcome to our forums

ftn95 5.20 - ALLOCATABLE in TYPE

17 Mar 2008 10:12 #2931

Use of ALLOCATABLE in TYPE declaration is now tolerated though not standard conforming. Er, tell us some more. Is this not TR15881?

17 Mar 2008 3:52 #2932

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.

25 Apr 2008 8:47 #3082

Quoted from PaulLaidler 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.

26 Apr 2008 6:53 #3083

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.

Please login to reply.