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-Thread: a07f3367d7,c689b55786a9f2bd X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!feeder.erje.net!news2.arglkargh.de!news.tornevall.net!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: for S'Image use Func?? Date: Thu, 06 May 2010 15:33:00 -0700 Organization: TornevallNET - http://news.tornevall.net Message-ID: References: NNTP-Posting-Host: 182034932d8a3725712acecb2a47f105 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: 5135adb26402c1bbfcdfe3ecfcd91bd4 X-Complaints-To: abuse@tornevall.net X-Complaints-Language: Spoken language is english or swedish - NOT ITALIAN, FRENCH, GERMAN OR ANY OTHER LANGUAGE! In-Reply-To: X-Validate-Post: http://news.tornevall.net/validate.php?trace=5135adb26402c1bbfcdfe3ecfcd91bd4 X-SpeedUI: 1738 X-Complaints-Italiano: Non abbiamo padronanza della lingua italiana - se mandate una email scrivete solo in Inglese, grazie User-Agent: Thunderbird 2.0.0.24 (X11/20100411) X-Posting-User: 0243687135df8c4b260dd4a9a93c79bd Xref: g2news2.google.com comp.lang.ada:11345 Date: 2010-05-06T15:33:00-07:00 List-Id: Warren wrote: > > True, but in my case I just needed the leading zeros, sans > any sign: > > 900 to be displayed as "00900" (vs " 900"). In my job we make extensive use of the image functions from PragmARC.Images. These have optional Width, Base, and Zero_Filled parameters. So we'd use function Image is new PragmARC.Images.Signed_Image (Your_Signed_Integer_Type_Here); Image (V, Width => 5, Zero_Filled => True) to get your "00900". (There's also Modular_Image for modular integer types.) We use them a lot just to avoid the leading blank from 'Image, but also for this. The PragmARCs are Ada 95, and many of the packages won't compile with a compiler for the current language, but this one will. http://pragmada.x10hosting.com/ -- Jeff Carter "I soiled my armor, I was so scared." Monty Python & the Holy Grail 71