comp.lang.ada
 help / color / mirror / Atom feed
From: adam@irvine.com
Subject: Re: Creation of storage pools
Date: 1999/06/07
Date: 1999-06-07T00:00:00+00:00	[thread overview]
Message-ID: <7jhd6o$28e$1@nnrp1.deja.com> (raw)
In-Reply-To: 375B1A89.53E3@sydney.gecm.com

In article <375B1A89.53E3@sydney.gecm.com>,
  Graeme Perkes <graeme.perkes@sydney.gecm.com> wrote:

> Is "for X'Storage_Pool use MY_Pool.all" really a GNAT bug? The
> wording in RM95 13.11(15) indicates that a variable _name_ is
> required.

Nope, it doesn't say a variable name is required.  It says "the _name_
in a Storage_Pool clause shall denote a variable."  The terms don't mean
what you think they do.  "name" is defined in 4.1(2), and this
definition includes explicit dereferences (i.e. something.ALL).
"variable" is defined in 3.3(13) and basically refers to a view of an
object that can be changed.  3.3(9) says that the result of
dereferencing an "access-to-object" value (defined in 3.10(7)) is an
"object".  So if you string all this together, you find that
"MY_Pool.all" is indeed a name that denotes a variable.  (Unless I
missed something else, not at all unlikely.)

I suspect you were thinking that a "variable name" is the identifier
that you declared in a variable object declaration.  You have to be
careful when reading the RM not to assume terms mean what they look
like; often, the terms have formal definitions that don't quite match
how we're used to thinking about them.  I've stumbled across this a
number of times; in fact, keeping in mind how I embarrassed myself last
time I posted a question to c.l.a and didn't understand what one of the
terms meant, I had to look up "denote" in the index to make sure I was
understanding 13.11(15) correctly.

				-- Adam


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




      reply	other threads:[~1999-06-07  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-26  0:00 Creation of storage pools Graeme Perkes
1999-06-04  0:00 ` Matthew Heaney
1999-06-04  0:00   ` Tucker Taft
1999-06-05  0:00 ` Simon Wright
1999-06-07  0:00   ` Graeme Perkes
1999-06-07  0:00     ` adam [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox