comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@bix.com
Subject: Re: Displaying Unsigned Integer
Date: Tue, 22 Aug 2000 03:28:34 GMT
Date: 2000-08-22T03:28:34+00:00	[thread overview]
Message-ID: <Crmo5.122744$i5.1801927@news1.frmt1.sfba.home.com> (raw)
In-Reply-To: 39A1D710.C7E09632@erols.com

>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;



      reply	other threads:[~2000-08-22  3:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-21  0:00 Displaying Unsigned Integer Daniel Allex
2000-08-22  3:28 ` tmoran [this message]
replies disabled

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