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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9adb0110470c093d X-Google-Attributes: gid103376,public From: Preben Randhol Subject: Re: Safely converting String to Float ? Date: 1999/11/03 Message-ID: #1/1 X-Deja-AN: 543954995 References: <38203f2a_1@news1.prserv.net> X-Complaints-To: usenet@itea.ntnu.no X-Trace: kopp.stud.ntnu.no 941638721 22153 129.241.83.82 (3 Nov 1999 14:18:41 GMT) Organization: ProgramVareVerkstedet NNTP-Posting-Date: 3 Nov 1999 14:18:41 GMT Newsgroups: comp.lang.ada Date: 1999-11-03T14:18:41+00:00 List-Id: "Matthew Heaney" writes: | A few more points: | | 1) If you're using type Float, you don't need to instantiate | Text_IO.Float_IO, because there's a predefined package called | Ada.Float_Text_IO. Aha. Btw. How do one find a overview of these packages. I've been looking in the RM, but I haven't really found one (overview). I'm not to familiar with using it yet though. | 2) If you use Get, then the last parameter is not a "size" of subtype | "Integer," it indicates the last index position of the value image, and | its subtype is "Natural." Oops you'r right. Thanks. | 3) You don't really need Float_Text_IO or Get; simply use the attribute | Float'Value to convert the string: Ah great now it works! Thank you very much! -- Preben Randhol Affliction is enamoured of thy parts, [randhol@pvv.org] And thou art wedded to calamity. [http://www.pvv.org/~randhol/] -- W. Shakespeare