comp.lang.ada
 help / color / mirror / Atom feed
* Integer_IO or Modular_IO with different base as default
@ 2021-11-15 21:27 Ken Roberts
  2021-11-15 21:40 ` Simon Wright
  2021-11-15 22:13 ` Ben Bacarisse
  0 siblings, 2 replies; 6+ messages in thread
From: Ken Roberts @ 2021-11-15 21:27 UTC (permalink / 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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-11-19  0:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-11-15 22:13 ` Ben Bacarisse

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