From: Darel Cullen <Darel@djcull.demon.co.uk.demon.co.uk>
Subject: -ve values in enumeration rep clauses.
Date: 1996/06/14
Date: 1996-06-14T00:00:00+00:00 [thread overview]
Message-ID: <5c3p6DALoKwxEwb0@djcull.demon.co.uk> (raw)
Hi,
Came across an interesting problem at work today.
What happens if for example :-
type A_Type is
( A, B, C );
for A_Type use
(
A => -1,
B => -2,
C => -3
);
for A_Type'Size use 8;
Now - to be able to extract the -ve values via unchecked_conversion
from a byte proves impossible because the use 8 creates an unsigned
byte, so whats the best way to represent negative values from a
rep-claused enumerated type ?
--
Darel Cullen
next reply other threads:[~1996-06-14 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-06-14 0:00 Darel Cullen [this message]
1996-06-14 0:00 ` -ve values in enumeration rep clauses Pascal Ledru
1996-06-14 0:00 ` Adam Beneschan
1996-06-14 0:00 ` James Rhodes
1996-06-15 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