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,a6692a7d92b3309b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-04-11 22:13:53 PST Path: archiver1.google.com!news1.google.com!news.glorb.com!wn52feed!worldnet.att.net!207.217.77.102!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.news.pas.earthlink.net.POSTED!01cc3b7c!not-for-mail Reply-To: "Richard Riehle" From: "Richard Riehle" Newsgroups: comp.lang.ada References: Subject: Re: Converting numbers to strings without Ada.Text_IO? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: Date: Mon, 12 Apr 2004 05:13:53 GMT NNTP-Posting-Host: 66.81.223.192 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.news.pas.earthlink.net 1081746833 66.81.223.192 (Sun, 11 Apr 2004 22:13:53 PDT) NNTP-Posting-Date: Sun, 11 Apr 2004 22:13:53 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:6990 Date: 2004-04-12T05:13:53+00:00 List-Id: "Tapio Kelloniemi" wrote in message news:rWfdc.2825$MA6.804@reader1.news.jippii.net... > My idea is to convert variables of generic integer and real types to > some type that can represent all possible integers or reals on that > system and then recursively extracting the digits by dividing by base > etc. Are there some issues that I should be aware of? This question comes up so often among novices to Ada that I included an extended example of it in Ada Distilled. The examples are in valid source code and each line of code is commented. You can download Ada Distilled from http://www.adaic.org along with a Zip file with all the programs in electronic form so you can experiment with them. Richard Riehle