* Displaying Unsigned Integer
@ 2000-08-21 0:00 Daniel Allex
2000-08-22 3:28 ` tmoran
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Allex @ 2000-08-21 0:00 UTC (permalink / raw)
How do I print an unsigned integer in octal to the screen?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Displaying Unsigned Integer
2000-08-21 0:00 Displaying Unsigned Integer Daniel Allex
@ 2000-08-22 3:28 ` tmoran
0 siblings, 0 replies; 2+ messages in thread
From: tmoran @ 2000-08-22 3:28 UTC (permalink / raw)
>How do I print an unsigned integer in octal to the screen?
Like this:
with Ada.Text_IO;
procedure Test is
type Unsigned_16 is mod 2**16;
package Unsigned_16_IO is new Ada.Text_IO.modular_io(Unsigned_16);
x : Unsigned_16 := 4097;
begin
Unsigned_16_IO.Put(x, base=>8); -- puts "8#10001#" on stdout
end Test;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-08-22 3:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-21 0:00 Displaying Unsigned Integer Daniel Allex
2000-08-22 3:28 ` tmoran
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox