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,cf09cb55989cab65 X-Google-Attributes: gid103376,public From: dewarr@my-dejanews.com Subject: Re: Data conversion Date: 1998/11/01 Message-ID: <71hunt$bjr$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 407250313 References: <71fcr5$9to@sifon.cc.mcgill.ca> <363B5ADC.8639CEB0@magic.fr> X-Http-Proxy: 1.0 x8.dejanews.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Sun Nov 01 15:29:01 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/2.02 (OS/2; I) Date: 1998-11-01T00:00:00+00:00 List-Id: In article <363B5ADC.8639CEB0@magic.fr>, Pascal MALAISE wrote: > Mat & Syl wrote: > > > > I need a function to convert float to string and other one for string to > > float. > > > > Thanks > text_io (83) or Ada.Text_IO.Float_IO (95) > > private generic > type Num is digits <>; > package Ada.Text_IO.Float_IO is > ... > procedure Get > (From : in String; > Item : out Num; > Last : out Positive); > > procedure Put > (To : out String; > Item : in Num; > Aft : in Field := Default_Aft; > Exp : in Field := Default_Exp); > ... > > -- > Pascal MALAISE > (priv) mailto:malaise@magic.fr > (prof) mailto:malaise@fr.airsysatm.thomson-csf.com This is a frequent answer o this FAQ, but for most purposes it is not the most convenient answer, ESPECIALLY for input, where 'Value is far better. Usually 'Image is more convenient for output, but of course Put to a string is more appropriate if you need to control the format. -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own