comp.lang.ada
 help / color / mirror / Atom feed
From: Wolfgang Jeltsch <jeltsch@tu-cottbus.de>
Subject: Re: Newbie question : types , representation
Date: 1999/08/23
Date: 1999-08-23T20:08:43+00:00	[thread overview]
Message-ID: <37C1AA76.14D14819@tu-cottbus.de> (raw)
In-Reply-To: 7ppdon$j3p$1@nnrp1.deja.com

Robert Dewar wrote:

> [...]
> > Also I will need some kind of assignment to that modular type,
> say aVar
> > := 2#00000011#. This will assign the value 3 to aVar ? Is this
> > guaranteed to have that bit pattern ?
>
> nope, and of course there is no such guarantee in C either
> [...]

Oops! I thought shifting on modular types would not work with the internal
representation of the value but with its binary representation so that these
operations would be platform independent. Is this really not the case? If not
wouldn't this mean that the shift operations are useless if you want to write
portable code?

Wolfgang

************************************************************************
Wolfgang Jeltsch
    jeltsch@tu-cottbus.de
        http://www-user.tu-cottbus.de/~jeltsch
************************************************************************





  reply	other threads:[~1999-08-23  0:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-22  0:00 Newbie question : types , representation Jos De Laender
1999-08-22  0:00 ` Wilhelm Spickermann
1999-08-23  0:00   ` Simon Wright
1999-08-23  0:00   ` Martin C. Carlisle
1999-08-22  0:00 ` Robert Dewar
1999-08-23  0:00   ` Wolfgang Jeltsch [this message]
1999-08-24  0:00     ` tmoran
1999-08-24  0:00   ` jdla
1999-08-24  0:00     ` Matthew Heaney
1999-08-24  0:00       ` Jos De Laender
1999-08-24  0:00         ` Brian Rogoff
1999-08-25  0:00           ` Jos De Laender
1999-08-22  0:00 ` Martin Dowie
     [not found] ` <37C621F3.C6C0DC3A@acenet.com.au>
1999-08-27  0:00   ` tmoran
1999-08-27  0:00     ` Florian Weimer
1999-08-27  0:00   ` David C. Hoos, Sr.
replies disabled

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