From: Stephen Leake <stephen_leake@acm.org>
To: comp.lang.ada@ada-france.org
Subject: Re: newbie: fixed_text_io and decimals
Date: 21 Mar 2004 08:28:24 -0500
Date: 2004-03-21T08:28:24-05:00 [thread overview]
Message-ID: <mailman.121.1079875715.327.comp.lang.ada@ada-france.org> (raw)
In-Reply-To: <1314ac77.0403201847.3cb55265@posting.google.com>
nexus@nexus.webhour.net (Lee Jun Wei) writes:
> Hello, I have just started picking up Ada by myself 3 days ago
> (background in C++,VB,learning Java and PHP currently as well).
>
> I read a few tutorials and they pointed that you could use
> Ada.Fixed_Text_IO to Put() and Get() values, but somehow ObjectAda and
> GNAT both complained they don't exist.
>
> My data type is: type decimal is delta 0.01 range 0.00 .. 9999.00;
with Ada.Text_Io;
procedure Example
is
type decimal is delta 0.01 range 0.00 .. 9999.00;
package Decimal_Text_IO is new Ada.Text_Io.Fixed_Io (Decimal);
A : constant Decimal := 10.2;
begin
Ada.Text_Io.Put ("A is :");
Decimal_Text_IO.Put (A);
Ada.Text_Io.New_Line;
end Example;
--
-- Stephe
next prev parent reply other threads:[~2004-03-21 13:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-21 2:47 newbie: fixed_text_io and decimals Lee Jun Wei
2004-03-21 13:28 ` Stephen Leake [this message]
2004-03-22 16:04 ` jdpetrey<NO_SPAM>
2004-03-24 18:02 ` Lee Jun Wei
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox