(j3.2006) Specification part in every <block>, not just BLOCK?
Thu Dec 21 18:37:46 EST 2006
On Thu, 2006-12-21 at 15:29 -0800, Aleksandar Donev wrote:
> P.S. Recall that BLOCK itself was "creeped" via the macro feature, as
> it was realized declaring localized variables was most useful for
It was realized that it is necessary for macros, but it is certainly
Of course, the example I gave wouldn't need to put the declaration in an
internal subroutine or a BLOCK within an IF if we had done conditional
expressions. I would write
real(rp) :: ETA_T2(size(vert_inds),present(z_basis)?size(z_basis):0)
which isn't quite as elegant as not having it at all, but still saves
nearly all of its storage when it's not needed.
If we ever do conditional expressions, it would be convenient to extend
"automatic" to include the condition whether a variable exists at all,
real(rp) :: present(z_basis) ? ETA_T2(size(vert_inds),size(z_basis))
which says "ETA_T2 is an automatic variable (and it would be even if it
were a scalar without a length parameter), which doesn't exist if
Z_Basis is not present."
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