Re: Allocatable scalar components not allowed in derived types... why?
by "James Giles" <jamesgiles@[EMAIL PROTECTED]
>
Jul 23, 2008 at 09:22 PM
Rich Townsend wrote:
> Just out of curiosity, could anyone enlighten me why allocatable
> scalars aren't allowed in derived types (in F2003 or F95 + TR15581)?
> It strikes me as this could be a useful way of having a component
> that either has a well-defined value (ALLOCATED(foo%bar) == .TRUE.)
> or has no value (ALLOCATED(foo%bar) == .FALSE.).
I can't find any place that prohibits scalar allocatables in
derived types. Do you have a page/line number pair for the
part of the standard that says so?
--
J. Giles
"I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies." -- C. A. R. Hoare
"Simplicity is prerequisite for reliability" -- E. W. Dijkstra