slightly OT: nullifying an array of pointers
Richard E Maine
Richard.Maine@nasa.gov
Fri Jul 7 19:54:00 GMT 2006
On Jul 6, 2006, at 1:28 PM, Brooks Moses wrote:
> Daniel Franke wrote:
>
>> For someone who coded C(++) for years this deviating behaviour
>> (although standard conforming) is ... strange....
>> As quoted by you, this behaviour is described in the standard.
>> That's fine for those who have the standards readily available - I
>> do not.
[Brooks then pointed out where to find the draft standards]
More to the point, I'd say... If you (Daniel) are trying to guess how
Fortran works based on an understanding of C++, you just aren't going
to have much luck. Fortran pointers are distinctly *NOT* like C/C++
pointers. They are enough unlike them that I seriously suggest that
people are better off forgetting everything they know about C
pointers and starting from scratch. (I sort of wish Fortran pointers
had been called something else, such as "aliases", which term I think
better captures the concept).
Whether you get the (draft) standards, a Fortran text (of which
plenty are readily available), or some other way of learning them,
almost anything is better than trying to extrapolate from C pointers.
If you keep trying that, I predict a future of frustration for you -
pretty much nothing is going to make sense.
--
Richard Maine | Good judgment comes from experience;
Richard.Maine@nasa.gov | experience comes from bad judgment.
| -- Mark Twain
More information about the Fortran
mailing list