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.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c9045fff6a55db79 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-22 08:04:39 PST Path: archiver1.google.com!news1.google.com!news.glorb.com!border1.nntp.ash.giganews.com!border2.nntp.sjc.giganews.com!nntp.giganews.com!cyclone-sf.pbi.net!151.164.30.34!cyclone.swbell.net!bos-service1.raytheon.com!dfw-service2.ext.ray.com.POSTED!53ab2750!not-for-mail From: "jdpetrey" <"jdpetrey"@raytheon.com> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: newbie: fixed_text_io and decimals References: <1314ac77.0403201847.3cb55265@posting.google.com> In-Reply-To: <1314ac77.0403201847.3cb55265@posting.google.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <08E7c.1$6D5.0@dfw-service2.ext.ray.com> Date: Mon, 22 Mar 2004 09:04:11 -0700 NNTP-Posting-Host: 147.24.201.186 X-Complaints-To: news@ext.ray.com X-Trace: dfw-service2.ext.ray.com 1079971452 147.24.201.186 (Mon, 22 Mar 2004 10:04:12 CST) NNTP-Posting-Date: Mon, 22 Mar 2004 10:04:12 CST Organization: Raytheon Company Xref: archiver1.google.com comp.lang.ada:6469 Date: 2004-03-22T09:04:11-07:00 List-Id: 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.