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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,74e13f9928bee620 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-04 02:58:58 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!fu-berlin.de!uni-berlin.de!tar-alcarin.cbb-automation.DE!not-for-mail From: Dmitry A. Kazakov Newsgroups: comp.lang.ada Subject: Re: Base 12 Integer IO Date: Tue, 04 Feb 2003 11:58:56 +0100 Message-ID: <6v6v3v86o6tahjvofam8fjidomnbur3kgk@4ax.com> References: NNTP-Posting-Host: tar-alcarin.cbb-automation.de (212.79.194.111) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: fu-berlin.de 1044356336 38674679 212.79.194.111 (16 [77047]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:33754 Date: 2003-02-04T11:58:56+01:00 List-Id: On Mon, 3 Feb 2003 16:42:11 +0100 (CET), Paolo Argenton wrote: >I would like to do base 12 Integer IO; > >while the following code fragment works > > for I in 0..1488 loop > > Put( I, Width => 3, Base => 12 ); > > >It has 2 drawbacks (for me at least) > >1) the output is with leading base number and # i.e. 12#A40# while I would like to have the raw A40, for instance. > >2) width is not fixed, i.e. I would like to have in the output 005 for -say- number 5 instead of one digit only. > >How can I fix these things? Can I do Integer IO to a string, in order to reformat the string as I desire? You can use http://www.dmitry-kazakov.de/ada/strings_edit.htm. It has properties 1, 2. --- Regards, Dmitry Kazakov www.dmitry-kazakov.de