comp.lang.ada
 help / color / mirror / Atom feed
From: johnherro@aol.com (John Herro)
Subject: Re: Aft, Fore, and Exp
Date: 1999/06/09
Date: 1999-06-09T00:00:00+00:00	[thread overview]
Message-ID: <19990609124736.25593.00001294@ngol06.aol.com> (raw)
In-Reply-To: 4Lv73.14$ep6.23052@ratbert.tds.net

dginc@tds.net wants to know how to use Aft, Fore, and Exp

If you don't want your output is scientific notation, set Exp to 0 in the call
to Put.  Aft and Fore tell how many places after and before the decimal point. 
For example, this program produces three spaces followed by 19.8, because it
calls for five places before the decimal point and one after:

with Ada.Float_Text_IO; use Ada.Float_Text_IO;
procedure Test is
  F : Float := 19.8;
begin
  Put(Item => F, Fore => 5, Aft => 1, Exp => 0);
end Test;

- John Herro
You can download a shareware AdaTutor program at
http://members.aol.com/AdaTutor




      parent reply	other threads:[~1999-06-09  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-09  0:00 Aft, Fore, and Exp dginc
1999-06-09  0:00 ` David C. Hoos, Sr.
1999-06-09  0:00 ` Matthew Heaney
1999-06-09  0:00 ` John Herro [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox