comp.lang.ada
 help / color / mirror / Atom feed
From: Ken Roberts <alisonken1@gmail.com>
Subject: Integer_IO or Modular_IO with different base as default
Date: Mon, 15 Nov 2021 13:27:01 -0800 (PST)	[thread overview]
Message-ID: <49db08e4-4380-4877-9e50-a986856c9821n@googlegroups.com> (raw)

I've been trying to look at how to instantiate Ada.Text_IO.Integer_IO and Ada.Text_IO.Modular_IO with a different base as default (base 8 for a project I'm playing with while learning).

So far, the only thing I can find is instantiate with a different integer (or mod number), but the base is always defined as 10.

I'd like to output numbers for the project in base 8 (octal) in keeping with the documentation on how the digital system works.

Does anyone have an idea on how to instantiate Integer_IO (or Modular_IO) with Default_Base := 8 ?

So far, the only thing I've been able to work with is copy Ada.Text_IO.Integer_IO (or Modular_IO) in my project as a different package with the only change being the Default_Base parameter.

Any help with noob questions would be appreciated.

             reply	other threads:[~2021-11-15 21:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-15 21:27 Ken Roberts [this message]
2021-11-15 21:40 ` Integer_IO or Modular_IO with different base as default Simon Wright
2021-11-15 22:09   ` Ken Roberts
2021-11-15 23:10     ` Jeffrey R.Carter
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