replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Pointers
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 

Pointers

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



Joined: 29 Sep 2008
Posts: 4
Location: Glasgow

PostPosted: Fri May 15, 2015 1:40 am    Post subject: Pointers Reply with quote

Does Ftn95 have support for ponter arithmetic?
_________________
Dr. Peter Bladon
Gallowhill House, Larch Avenue
Lenzie, Kirkintilloch
Glasgow G66 4HX
Back to top
View user's profile Send private message Visit poster's website
mecej4



Joined: 31 Oct 2006
Posts: 1899

PostPosted: Fri May 15, 2015 3:50 am    Post subject: Reply with quote

The F95 standard allows variables to be given the Pointer attribute, and contains provisions for pointer assignment and allocation and status inquiry. FTN95 supports these features.

However, you explicitly wrote "pointer arithmetic". If you mean the sort of calculation that you can do in C with pointer variables, you will probably not find that in Fortran. As you may be aware, one does not use a dedicated dereferencing operator in Fortran (as one does in C, by using an asterisk added as a prefix to a pointer variable).

Being a Fortran 95 compiler, FTN95 does not support the ISO C-Interoperability features of Fortran 2003.


Last edited by mecej4 on Fri May 15, 2015 1:49 pm; edited 1 time in total
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Fri May 15, 2015 6:35 am    Post subject: Reply with quote

In other words, the C-Interoperability features of FTN95 do not conform to the 2003 standard. They have the advantage of being much simpler but the disadvantage of lacking strong type checking and portability.

Hopefully it won't be too long before these features are added to FTN95.
Back to top
View user's profile Send private message AIM Address
JohnCampbell



Joined: 16 Feb 2006
Posts: 2615
Location: Sydney

PostPosted: Fri May 15, 2015 12:56 pm    Post subject: Reply with quote

Paul,
Quote:
Hopefully it won't be too long before these features are added to FTN95.

I assume from this comment that some F2003 features may be added to FTN95. Is this to the 32 bit compiler or the new 64 bit compiler?
I am sure there are many of us who would like to contribute suggestions as to what is to be included on the list of additions !

John
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Fri May 15, 2015 3:19 pm    Post subject: Reply with quote

It would be to both. The "frontend" is common. But please don't make any suggestions right now.
Back to top
View user's profile Send private message AIM Address
JohnCampbell



Joined: 16 Feb 2006
Posts: 2615
Location: Sydney

PostPosted: Sat May 16, 2015 1:09 am    Post subject: Reply with quote

Paul,

I look forward to when you announce that suggestions for preferred features from F2003 and F2008 is open.

I must admit that my list would not be very extensive, as I consider most of the recent additions to be unnecessary.

When I ask the question: "Does the added language complexity make Fortran a more robust language?" I am increasingly thinking No.
My impressions of the recent examples of WHERE and FORALL could be easily replaced by a DO loop structure, with little or no performance loss but better clarity of the implied logic. (Both F95 features!)

I found the recent BBC series on computer languages to be very interesting. Where should Fortran go in the next 20 years ? The added complexity of F2003, F2008 and expected F2015/2020 risks it becoming even less accessible, while no change could see it becoming less relevant. Who will do the numerical coding in the future?

My personal rejection of the approach of F2003 and F2008 has been reinforced by the slow take-up of their features in compilers I am familiar with, most notably Intel ifort. If the new features were so good, it wouldn't have taken all this time for their implementation and for ifort it is still not complete. Is the situation similar for other Fortran environments ?
Where is portability, if most compilers have different subset of F2008 available ?

I think that inter-operability with Cxx could be improved in F95, with C_EXTERNAL being reworked to conform more closely to the Fortran changes of the last 20 years, although probably the best change for me would be to just better understand what is required: Anyone know a good description of what is required ?

John
Back to top
View user's profile Send private message
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