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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,39724010749e0909 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-29 12:10:00 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!newsfeed.telusplanet.net!ps01-chi1.MISMATCH!chi1.webusenet.com!news.webusenet.com!cyclone1.gnilink.net!wn11feed!wn13feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!not-for-mail Reply-To: "James S. Rogers" From: "James S. Rogers" Newsgroups: comp.lang.ada References: Subject: Re: Newbie Question: Floating Point Decimal Rounding X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: Date: Wed, 29 Jan 2003 20:09:59 GMT NNTP-Posting-Host: 12.86.34.18 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1043870999 12.86.34.18 (Wed, 29 Jan 2003 20:09:59 GMT) NNTP-Posting-Date: Wed, 29 Jan 2003 20:09:59 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:33579 Date: 2003-01-29T20:09:59+00:00 List-Id: "Sam T" wrote in message news:b194ob$uv$1@saturn.bton.ac.uk... > Hey, > I need to round a float to 2 decimal points > Any ideas? Yep. My idea is that you want the output rounded to two decimal places. This is done using the AFT parameter of the Put procedure instantiated from Ada.Text_Io.Float_IO, or from the pre-instantiated package Ada.Float_Text_IO. Ada.Float_Text_Io.Put(Item => YourValue, Aft => 2, Exp => 0); Jim Rogers