From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,INVALID_MSGID, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,fd8c808621763c34 X-Google-Attributes: gid103376,public From: "David C. Hoos, Sr." Subject: Re: help Please Date: 1999/01/26 Message-ID: <78kihc$m55@hobbes.crc.com>#1/1 X-Deja-AN: 437115509 References: <36ab9be5.2873369@news.ptd.net> <36ADB3F7.7A239560@gecm.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: Coleman Research Corporation Newsgroups: comp.lang.ada Date: 1999-01-26T00:00:00+00:00 List-Id: Steve Kerr wrote in message <36ADB3F7.7A239560@gecm.com>... >Matthew Heaney wrote: > >[....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.