comp.lang.ada
 help / color / mirror / Atom feed
From: Ken Roberts <alisonken1@gmail.com>
Subject: Re: Integer_IO or Modular_IO with different base as default
Date: Thu, 18 Nov 2021 16:06:42 -0800 (PST)	[thread overview]
Message-ID: <45dac231-22fa-409e-97a4-238d16fe832dn@googlegroups.com> (raw)
In-Reply-To: <smupcf$nk6$1@dont-email.me>

Sorry for the delay in getting back - $DAYJOB and $ILLNESS combined.

On Mon, Nov 15, 2021 at 3:10 PM Jeffrey R.Carter <deleted> wrote:
On 2021-11-15 23:09, Ken Roberts wrote:
> I was going to add before your reply that I'm trying to get output without the extra padding of showing the base.

Ada.Text_IO.Integer_IO and Ada.Text_IO.Modular_IO both declare

      Default_Base  : Number_Base := 10;

This is a variable, so you can change it.

However, that outputs in based-literal format.

You can use PragmARC.Images (https://github.com/jrcarter/PragmARC) to
obtain images in any base without the base information. Image width and
zero filling are also provided.

--
Jeff Carter

Hmmm. After testing by setting the base manually after instantiation, still adds the based-literal information as noted.

So, it's either copy Modular_IO into my project (with renaming) and change the default base, or add another package to monitor for updates.

Fun either way.

Thanks for the help both Jeff and Ben. (Sincerely, not ironically).

  reply	other threads:[~2021-11-19  0:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-15 21:27 Integer_IO or Modular_IO with different base as default Ken Roberts
2021-11-15 21:40 ` Simon Wright
2021-11-15 22:09   ` Ken Roberts
2021-11-15 23:10     ` Jeffrey R.Carter
2021-11-19  0:06       ` Ken Roberts [this message]
2021-11-15 22:13 ` Ben Bacarisse
replies disabled

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