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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable 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-21 05:30:05 PST Path: archiver1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.icl.net!newsfeed.fjserv.net!nnx.oleane.net!oleane!freenix!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: newbie: fixed_text_io and decimals Date: 21 Mar 2004 08:28:24 -0500 Organization: Cuivre, Argent, Or Message-ID: References: <1314ac77.0403201847.3cb55265@posting.google.com> NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: melchior.cuivre.fr.eu.org 1079875716 1249 212.85.156.195 (21 Mar 2004 13:28:36 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Sun, 21 Mar 2004 13:28:36 +0000 (UTC) To: comp.lang.ada@ada-france.org Return-Path: In-Reply-To: <1314ac77.0403201847.3cb55265@posting.google.com> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 X-Virus-Scanned: by amavisd-new-20030616-p7 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:6465 Date: 2004-03-21T08:28:24-05:00 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