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 

UNDEF not working properly
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
PaulLaidler
Site Admin


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

PostPosted: Sat Dec 05, 2020 9:51 am    Post subject: Reply with quote

A general comment concerning the use of the POINTER attribute when declaring a dummy argument...

In this context, the POINTER attribute is almost identical to the ALLOCATABLE attribute. It amounts to the same thing from the compiler writers' point of view but has different rules in the Fortran Standard.

The POINTER attribute (on a dummy argument) is only needed when an associated ALLOCATE (to the pointer) is anticipated within the current routine (or within a routine that is called from the current routine).

In other situations, the POINTER attribute is allowed but has no effect other than to add an unnecessary overhead to the compiled code. It is tempting to assume that, if the corresponding actual argument has the POINTER attribute, then the dummy argument should also have it, but this is not the case.

When the POINTER attribute is used on a dummy argument, the compiler must provide a mechanism to pass the SHAPE of the ALLOCATEd object back to the calling routine. The SHAPE can be unknown to the calling routine and defined by a call to ALLOCATE within the current routine. This definition could be at compile time or at run time.

FTN95 can be used with /CHECK to provide runtime checks for pointers that have not been allocated.
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
Goto page Previous  1, 2, 3
Page 3 of 3

 
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