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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Image attribute (yet again) Date: Sun, 26 Apr 2020 19:09:10 +0200 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <26e971a9-6fcc-4e4c-84ee-d74aecd5b217@googlegroups.com> <2c769c87-72f2-4107-b0bf-3846e3ae6c7a@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 26 Apr 2020 17:09:10 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="c15254cfebf51adcd1b5f06807e41d75"; logging-data="2069"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19bVp92cMI1MV+JQkWP0eh12sxzP4fb/uU=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 Cancel-Lock: sha1:HNCVC85AS2xfb1QVPEwSV7HThbw= In-Reply-To: <2c769c87-72f2-4107-b0bf-3846e3ae6c7a@googlegroups.com> Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:58498 Date: 2020-04-26T19:09:10+02:00 List-Id: On 4/26/20 4:16 PM, Jere wrote: >> > This might be a good time to ask since this comes up all the time > for me, but where are the formatting options for hexadecimal > to String. All I have found so far is the Put operation > in the various "_IO" packages and generics, but it isn't > useful at all for formatting hexadecimal values in real world > scenarios. I pretty much reinvent the wheel each time > I have some variant of needing this functionality. One of > these days I'll get around to making my own generic > version of it, but if the Ada standard provides a means > to do it, that would be optimal. The only option I have > found is the Put operation, but it is pretty abysmal to > use. Are there any solutions to this that I am missing > from within the Ada standard? I can't tell what problem you're talking about. Ada.Text_IO's numeric-I/O pkgs, sometimes combined with String-handling functions and basic 1-D array operations seem to provide everything one could want. Pkg PragmARC.Images has been around for a long time and provides generic Image functions for numeric types with width, zero-fill, and base options. https://github.com/jrcarter/PragmARC -- Jeff Carter "I'm a kike, a yid, a heebie, a hook nose! I'm Kosher, Mum! I'm a Red Sea pedestrian, and proud of it!" Monty Python's Life of Brian 77