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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,93265a02b823f66a X-Google-Attributes: gid103376,public From: Marin David Condic Subject: Re: Float to string conversion Date: 1999/03/18 Message-ID: <36F16AC3.696C40AE@pwfl.com>#1/1 X-Deja-AN: 456243832 Content-Transfer-Encoding: 7bit Sender: condicma@bogon.pwfl.com References: <7crnh9$773$1@nnrp1.dejanews.com> Content-Type: text/plain; charset=us-ascii Organization: Pratt & Whitney Mime-Version: 1.0 Reply-To: diespammer@pwfl.com Newsgroups: comp.lang.ada Date: 1999-03-18T00:00:00+00:00 List-Id: dd5372@my-dejanews.com wrote: > > I'm using Rapid to build a GUI interface for a simple demo program and need to > be able to convert float values to strings. Using the 'image property is okay > for integers, but using it on floats gives me the default Ada scientific > notation for floats. Any suggestions? > You'll want to investigate Ada.Text_IO.Float_IO and look at the "Put" procedures. One of them looks kind of like this: procedure Put ( To : out String ; Item : in Num ; Aft : in Field := Default_Aft ; Exp : in Field := Default_Exp) ; See also ARM A.10.9 for more details Note that you get a pre-instantiated version of this package called Ada.Float_Text_IO (ARM A.10.9{32..34}) for the standard type Float. That makes the job just a little easier. MDC -- Marin David Condic Real Time & Embedded Systems, Propulsion Systems Analysis United Technologies, Pratt & Whitney, Large Military Engines M/S 731-95, P.O.B. 109600, West Palm Beach, FL, 33410-9600 ***To reply, remove "bogon" from the domain name.***