comp.lang.ada
 help / color / mirror / Atom feed
From: "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com>
Subject: Re: help Please
Date: 1999/01/26
Date: 1999-01-26T00:00:00+00:00	[thread overview]
Message-ID: <78kihc$m55@hobbes.crc.com> (raw)
In-Reply-To: 36ADB3F7.7A239560@gecm.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 991 bytes --]


Steve Kerr wrote in message <36ADB3F7.7A239560@gecm.com>...
>Matthew Heaney wrote:
>
>[....snip snip.....]
<snip>
>  More simply, you can use the value attribute. For example
>
>    integer'value("4")
>
>will give you the integer value 4, not the code for ASCII "4".
>
>This attribute can be used with any string representing a discrete type, so
>I guess boolean'value("TRUE") works too (although I have only ever tried it
>with numeric values). Leading and trailing spaces in the string are
ignored,
>so there's no need to trim it. As a matter of interest, this 'value is the
>opposite of 'image.
>
Not quite true -- it's for every _scalar_ type which includes reals, as well
as discretes:

Hear what RM95 says:

S�Value For every scalar subtype S:

S�Value denotes a function with the following specification:

function S'Value(Arg : String)
return S'Base

This function returns a value given an image of the value as a String,
ignoring any leading or trailing spaces. See 3.5.







  reply	other threads:[~1999-01-26  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <36ab9be5.2873369@news.ptd.net>
1999-01-24  0:00 ` help Please Matthew Heaney
1999-01-26  0:00   ` Simon Wright
1999-01-26  0:00   ` Steve Kerr
1999-01-26  0:00     ` David C. Hoos, Sr. [this message]
1999-01-27  0:00       ` Steve Kerr
1999-01-27  0:00         ` Tucker Taft
2000-05-22  0:00 help please saju sathyan
2000-05-22  0:00 ` Gautier
2000-05-23  0:00   ` saju sathyan
  -- strict thread matches above, loose matches on Subject: below --
2001-12-16 15:27 Pierrick
2001-12-16 18:27 ` Patrick Hohmeyer
2001-12-16 19:46 ` Steve Doiel
replies disabled

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