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,c97358b269e7004d X-Google-Attributes: gid103376,public From: mcmorran@visi.net (Peter McMorran) Subject: Re: Convertion of string to float Date: 2000/11/18 Message-ID: <3a170d3c$1$zpzbeena$mr2ice@news.visi.net>#1/1 X-Deja-AN: 695232470 References: <3A114012.87772A75@hotmail.com> X-Trace: firenze 974589815 209.8.199.105 (Sat, 18 Nov 2000 18:23:35 EST) NNTP-Posting-Date: Sat, 18 Nov 2000 18:23:35 EST Newsgroups: comp.lang.ada Date: 2000-11-18T00:00:00+00:00 List-Id: In , on 11/14/00 at 02:50 PM, Robert A Duff said: >jordan writes: >> How can i convert an array of character to integer??? >> Or >> How can i convert a string to float??? >> (The case is that i get a string from the terminal, and i need to make >> part of it as a float number, how can i do??) >Look up the Image and Value attributes. Or use Float_IO.Get from Text_IO. One version of get takes a string as input. You need to instance Float_IO for the type you want to read, i.e. float. This gives you a clearly-defined exception interface, in case the string is badly formatted. Cheers, Peter -- ----------------------------------------------------------- mcmorran@visi.net (Peter McMorran) -----------------------------------------------------------