- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am a PhD student. I have been trying to understand any differences in the efficiency of the working of the programme between these three cases in (FORTRAN) programming:
1. Using a pointer linked to a whole array.
2. A pointer which is linked to the first element of an array, and the pointer link is changed in a loop in calculations so that the pointer is following the each element of the same array.
3. Only using an array.
As far as I know, in Fortran a value is passed by its reference. I think a pointer is used for the same purpose. So, why do we use pointers in Fortran?
Thank you very much for your time.
Umit Keskin
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You appear to be confusing legacy Cray pointers with Fortran 90 pointers, both of which ifort supports. A good article on the latter is at the top of my browser search:
http://www.personal.psu.edu/jhm/f90/lectures/42.html
While many Fortran compilers to use pass by reference, portable source code must not be dependent on that implementation, even if you solve the common problem of differing pointer sizes among common CPU modes.
http://www.personal.psu.edu/jhm/f90/lectures/42.html
While many Fortran compilers to use pass by reference, portable source code must not be dependent on that implementation, even if you solve the common problem of differing pointer sizes among common CPU modes.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page