comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <ggsub@pragmada.x10hosting.com>
Subject: Re: Hexadecimal and stream element arrays
Date: Mon, 19 Apr 2010 12:17:17 -0700 (PDT)
Date: 2010-04-19T12:17:17-07:00	[thread overview]
Message-ID: <90efa5d2-a438-451b-8eb6-0e913b4200ca@x12g2000yqx.googlegroups.com> (raw)
In-Reply-To: 2f4313a5-bb3d-4f7f-8a86-7c8f7d549c53@k41g2000yqf.googlegroups.com

On Apr 19, 9:24 am, Ludovic Brenta <ludo...@ludovic-brenta.org> wrote:
>
> If you want to avoid the 16## part, you can easily convert the
> stream_elements to a string representation yourself like so:
>
> function To_Hex (E : in Ada.Streams.Stream_Element) return String is

This seems unnecessarily complex to me. Using the standard library to
put an element to a String in base 16, then stripping the "16#" from
the front and '#' from the end seems simpler, clearer, and less error
prone.

The PragmAda Reusable Components include Image functions with optional
Width, Zero_Filled, and Base parameters that do not include any base
indicator in the image. See PragmARC.Images and PragmARC.Images.Image.

http://pragmada.x10hosting.com/



  parent reply	other threads:[~2010-04-19 19:17 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-19 15:44 Hexadecimal and stream element arrays tonyg
2010-04-19 15:58 ` tonyg
2010-04-19 16:24   ` Ludovic Brenta
2010-04-19 16:27     ` tonyg
2010-04-19 17:02       ` tonyg
2010-04-19 17:26         ` tonyg
2010-04-19 20:50           ` Ludovic Brenta
2010-04-20  9:00             ` tonyg
2010-04-20  9:25               ` Peter Hermann
2010-04-19 18:05     ` Warren
2010-04-19 19:21       ` Jeffrey R. Carter
2010-04-19 19:28         ` Warren
2010-04-19 23:21           ` John B. Matthews
2010-04-19 23:22           ` Adam Beneschan
2010-04-20 14:04             ` Warren
2010-04-20 14:46               ` J-P. Rosen
2010-04-20 15:52                 ` Warren
2010-04-19 19:17     ` Jeffrey R. Carter [this message]
2010-04-19 20:52       ` Ludovic Brenta
2010-04-19 23:34         ` Jeffrey R. Carter
2010-04-19 17:20   ` John B. Matthews
2010-04-19 17:27   ` Dmitry A. Kazakov
2010-04-19 17:55     ` tonyg
2010-04-20  7:25 ` Stephen Leake
2010-04-20 22:21   ` Jeffrey R. Carter
2010-04-21 12:38     ` Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox