From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_05,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8272e612db888282,start X-Google-Attributes: gid103376,public From: Darel Cullen Subject: -ve values in enumeration rep clauses. Date: 1996/06/14 Message-ID: <5c3p6DALoKwxEwb0@djcull.demon.co.uk>#1/1 X-Deja-AN: 160049331 distribution: world x-nntp-posting-host: djcull.demon.co.uk organization: my bedroom mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-06-14T00:00:00+00:00 List-Id: 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