On Fri, 31 Mar 2000, Tim Prince wrote:
> g77 does support automatic arrays, but, as Phillip pointed out,
> the -fno-automatic option, which is documented as being equivalent to a
> default SAVE, has no effect on automatic arrays. BTW, the size limits on
> g77 automatic arrays are probably system-dependent and not well tested.
Thanks, I get it now. My confusion came mainly from identifying "local"
variable to "automatic" variable. For arrays, I see now that Fortran has
a specific meaning for "automatic": they're a special type of local array,
in that their declaration depends on non-constant expressions:
subroutine mysub(a)
real, dimension(:) :: a
real, dimension(size(a)) :: b ! b is an automatic array
real, dimension(5) :: c ! c is just a local array
So in this example the array c would be affected by compiler switches like
-fno-automatic (or -stackvar for Sun), while b wouldn't be affected.
Do I get it right now?
Thanks to all that replied,
Jose
--
Jose L Marin [log in to unmask]
Dept of Mathematics [log in to unmask]
Heriot-Watt University
Edinburgh EH14 4AS, U.K.
Phone: +44 131 451 3717
Fax: +44 131 451 3249
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|