comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not>
Subject: Re: Integer_IO or Modular_IO with different base as default
Date: Tue, 16 Nov 2021 00:10:05 +0100	[thread overview]
Message-ID: <smupcf$nk6$1@dont-email.me> (raw)
In-Reply-To: <09d82d22-aca1-4ff9-9e2a-33a180544f88n@googlegroups.com>

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
"I spun around, and there I was, face to face with a
six-year-old kid. Well, I just threw my guns down and
walked away. Little bastard shot me in the ass."
Blazing Saddles
40

  reply	other threads:[~2021-11-15 23:10 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 [this message]
2021-11-19  0:06       ` Ken Roberts
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