Fortran: Statement functions and their arguments.
toon@moene.indiv.nluug.nl
toon@moene.indiv.nluug.nl
Tue Dec 28 14:04:00 GMT 1999
David,
As promised I took up this question with comp.lang.fortran.
Richard Maine, our esteemed (Standards) editor, gave the most
comprehensive answer, which is that arguments to statement functions
are *scalars*. This is the relevant quotation of the Fortran 90
Standard (the Fortran 77 Standard is unusually obscure about the
arguments of statement functions):
The main citation is the penultimate para of 12.5.4
"The value of a statement function reference is obtained by evaluating
the expression using the values of the actual arguments for the values
of the corresponding dummy arguments..."
Note that it talks about *values*. So the value of bla(istart) is
the value of that particular array element - not its address.
If you want the full discussion, use http://deja.com using the following
search string: fun with statement functions
[ BTW, if the LANL folks come to haunt you, we'll sent Tony Warnock,
our chairman, to hit them over the head with a blunt object.
He works for LANL longer than he cares to remember :-) ]
Cheers,
Toon Moene.
More information about the Gcc-bugs
mailing list