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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a6692a7d92b3309b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-04-09 05:34:46 PST Path: archiver1.google.com!news1.google.com!news.glorb.com!wn14feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Converting numbers to strings without Ada.Text_IO? From: James Rogers References: Message-ID: User-Agent: Xnews/5.04.25 Date: Fri, 09 Apr 2004 12:34:46 GMT NNTP-Posting-Host: 12.73.180.49 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1081514086 12.73.180.49 (Fri, 09 Apr 2004 12:34:46 GMT) NNTP-Posting-Date: Fri, 09 Apr 2004 12:34:46 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:6896 Date: 2004-04-09T12:34:46+00:00 List-Id: "Martin Dowie" wrote in news:c55ec1$gsj$1@sparta.btinternet.com: >> >> Well, my question is: how could in convert integer and real numbers >> >> portably into strings without using Ada.Text_IO? >> > >> > You could copy the algorithm GNAT uses for conversions from >> > Ada.Text_IO into your own package (with appropriate copyrighting kept) >> >> You could also simply call the 'Image attribute of the integer or >> real number. > > My assumption (which could be wrong!) is the OP is using > Ada.Text_IO.* to get access to finer levels of formatting > the 'Image offers. The Ada.Text_Io package provides the ability to convert between number bases for integers. Other than that, there is no finer formatting needed. Once a string version of an integer or real type is created the programmer can parse and modify that string for any additional formatting requirements. Jim Rogers