comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison <dennison@telepath.com>
Subject: Re: number bases
Date: 1999/11/01
Date: 1999-11-01T00:00:00+00:00	[thread overview]
Message-ID: <7vkk54$bj4$1@nnrp1.deja.com> (raw)
In-Reply-To: 381D4C88.B5E8BBE7@interact.net.au

In article <381D4C88.B5E8BBE7@interact.net.au>,
  G <Dizzy@interact.net.au> wrote:
> If someone decides to represent all or the majority of integers in a
> program unit with base 2
> or
> 16
> - does this in any way optimise the code.  Which is to say - does it
> take less space in memory and is it more efficient (does it run
faster)
> to represent integers (floats, whatever) in a form closer to the
machine
> architecture/structure (i.e. binary) ?

I'm not sure what you are asking here. If you mean does
   Fred : constant Integer := 2#1011#;
take less space or time at runtime than
   Fred : constant Integer := 11;

the answer is no. They are both translated into the exact same thing at
compile time. This is the same answer you'd get if you were asking the
same question about a C or Java compiler.

--
T.E.D.


Sent via Deja.com http://www.deja.com/
Before you buy.




  parent reply	other threads:[~1999-11-01  0:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-01  0:00 number bases G
1999-11-01  0:00 ` Robert Dewar
1999-11-01  0:00 ` JP Thornley
1999-11-02  0:00   ` Robert Dewar
1999-11-01  0:00 ` Ted Dennison [this message]
1999-11-01  0:00 ` tmoran
1999-11-02  0:00   ` Robert Dewar
1999-11-02  0:00     ` tmoran
1999-11-02  0:00 ` Daryle Walker
1999-11-03  0:00   ` Robert Dewar
replies disabled

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