comp.lang.ada
 help / color / mirror / Atom feed
From: "jdpetrey<NO_SPAM>" <"jdpetrey<NO_SPAM>"@raytheon.com>
Subject: Re: newbie: fixed_text_io and decimals
Date: Mon, 22 Mar 2004 09:04:11 -0700
Date: 2004-03-22T09:04:11-07:00	[thread overview]
Message-ID: <08E7c.1$6D5.0@dfw-service2.ext.ray.com> (raw)
In-Reply-To: <1314ac77.0403201847.3cb55265@posting.google.com>

There is no standard fixed type so you need to instantiate a version of 
Fixed_Io for your type.  Try adding:

package Decimal_IO is new Ada.Text_Io.Fixed_Io(Decimal); use Decimal_Io;

after your type definition and then you can Put and Get those type values.
(get rid of the with ada.fixed_text_Io)

Jerry


Lee Jun Wei wrote:
> 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;
> 
> My header: 
> with ada.text_io,ada.integer_text_io,ada.float_text_io,ada.fixed_text_Io;
> use  ada.text_io,ada.integer_text_io,ada.float_text_io,ada.fixed_text_io;
> 
> Could someone help out? Thanks in advance.




  parent reply	other threads:[~2004-03-22 16:04 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
2004-03-22 16:04 ` jdpetrey<NO_SPAM> [this message]
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