Aleksandar asked:
> In Fortran 95, only arrays can have the ALLOCATABLE argument. As I am
> reading the F2x draft, it seems to me this restriction has been lifted
> and now scalars can be allocatable as well. Am I correct or just missing
> it (I do not have the F95 standard to compare the relevant sections
> against)?
>
> If I am correct: I presume this was done because of polymorphic
> variables, which must in some sense be deffered simply because of their
> deferred type, and it is often not appropriate to make them fully
> dynamic (i.e. pointer), say for efficiency or clarity or automatic
> deallocation or whatever. Close?
It's also necessary for scalar objects of parameterized type that have
deferred nonkind parameters that are ultimately used for dimensions of
components.
The restriction seemed a bit worthless, anyway. It's probably more
difficult for compilers to check for it and prevent it than just to
allow it.
--
What fraction of Americans believe | Van Snyder
Wrestling is real and NASA is fake? | [log in to unmask]
Any alleged opinions are my own and have not been approved or disapproved
by JPL, CalTech, NASA, Sean O'Keefe, George Bush, the Pope, or anybody else.
|