(j3.2006) Fodder for another interp?
Van Snyder
Van.Snyder
Fri Oct 5 16:52:03 EDT 2012
Consider the little program
real, allocatable :: A(:)
a = 1.0
print *, size(a)
end
What does it print?
7.2.1.3p3 says "If a variable is or becomes an unallocated allocatable
variable, it is then allocated with ... if the variable is an array and
<expr> is a scalar, the same bounds as before.
What bounds did A have before?
Two of my compilers print "Segmentation fault". Another one prints 0.
--
Van Snyder | What fraction of Americans believe
Van.Snyder at jpl.nasa.gov | Wrestling is real and NASA is fake?
Any alleged opinions are my own and have not been approved or
disapproved by JPL, CalTech, NASA, the President, or anybody else.
More information about the J3
mailing list