From: James Rogers <jimmaureenrogers@worldnet.att.net>
Subject: Re: how to print position number of an enumeration variable?
Date: Sun, 30 Sep 2001 06:27:55 GMT
Date: 2001-09-30T06:27:55+00:00 [thread overview]
Message-ID: <3BB6BB75.D88EECE3@worldnet.att.net> (raw)
In-Reply-To: 9p6b3m02v4v@drn.newsguy.com
"mike@nospam" wrote:
>
> but 'pos is not listed as an attribute. I am looking at page 34-36 of the RM,
> and I do not see such attribute for scalar types (that is why I asked), and enum
> is scalar type.
>
> strange. But thanks!
Look again. This time look at page 474 of the RM, in the summary of
Language Defined Attributes.
You will find the following:
S'Pos For every discrete subtype S:
S'Pos denotes a function with the following specification:
function S'Pos(Arg : S'Base) return universal_integer
This function returns the position number of the value Arg,
as a value of type universal_integer.
All enumeration types are discrete types.
Jim Rogers
Colorado Springs, Colorado USA
next prev parent reply other threads:[~2001-09-30 6:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-30 1:09 how to print position number of an enumeration variable? mike
2001-09-30 2:31 ` DuckE
2001-09-30 5:37 ` mike
2001-09-30 6:27 ` James Rogers [this message]
2001-09-30 12:52 ` Robert Dewar
2001-10-02 17:49 ` Randy Brukardt
2001-09-30 12:50 ` Robert Dewar
2001-09-30 13:53 ` David Botton
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox