From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: Type casting question
Date: 1999/12/21
Date: 1999-12-21T00:00:00+00:00 [thread overview]
Message-ID: <83o9d0$ul9$1@nnrp1.deja.com> (raw)
In-Reply-To: 385E87D8.2B44B800@tridsys.com
In article <385E87D8.2B44B800@tridsys.com>,
comp.lang.ada@ada.eu.org wrote:
> Question: Could someone please provide some solution
> to the below?
>
> I have this question in the conversion of values
> between the string and the my own type shown below.
>
> type Bit_5 is range 2#0# .. 2#11111#;
> for Bit_5'Size use 5;
> subtype Size_Type is Bit_5;
By the way, it is almost certainly wrong to have the base
type of Bit_5 be signed.
Almost certainly what you want here is
type Bit_5 is mod 2 ** 5;
The size clause is unnecessary in either case, since the
default size in both cases is obviously 5!
Sent via Deja.com http://www.deja.com/
Before you buy.
next prev parent reply other threads:[~1999-12-21 0:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-12-20 0:00 Type casting question Raju Vemulamanda
1999-12-20 0:00 ` DuckE
1999-12-21 0:00 ` Robert Dewar [this message]
1999-12-21 0:00 ` reason67
1999-12-21 0:00 ` Robert Dewar
1999-12-21 0:00 ` reason67
1999-12-22 0:00 ` Ted Dennison
1999-12-23 0:00 ` Robert Dewar
1999-12-23 0:00 ` reason67
1999-12-23 0:00 ` Robert Dewar
1999-12-23 0:00 ` reason67
1999-12-23 0:00 ` Robert Dewar
1999-12-23 0:00 ` Larry Kilgallen
1999-12-24 0:00 ` Robert Dewar
1999-12-21 0:00 ` Robert Dewar
1999-12-21 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