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,cf09cb55989cab65 X-Google-Attributes: gid103376,public From: "David C. Hoos, Sr." Subject: Re: Data conversion Date: 1998/10/31 Message-ID: <7RakvAPB#GA.171@samson.airnet.net>#1/1 X-Deja-AN: 408014344 References: <71fcr5$9to@sifon.cc.mcgill.ca> Newsgroups: comp.lang.ada X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Date: 1998-10-31T00:00:00+00:00 List-Id: Mat & Syl wrote in message <71fcr5$9to@sifon.cc.mcgill.ca>... >I need a function to convert float to string and other one for string to >float. The language attributes 'Image, and 'Value, respectively, do just that. Here are the appropriate excerpts from Annex K of the Ada95 Reference Manual: 88 S�Image For every scalar subtype S: 89 S�Image denotes a function with the following specification: 90 function S'Image(Arg : S'Base) return String 91 The function returns an image of the value of Arg as a String. See 3.5. 264 S�Value For every scalar subtype S: 265 S�Value denotes a function with the following specification: 266 function S'Value(Arg : String) return S'Base 267 This function returns a value given an image of the value as a String, ignoring any leading or trailing spaces. See 3.5. David C. Hoos, Sr.