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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,45a9122ddf5fcf5,start X-Google-Attributes: gid103376,public From: mheaney@ni.net (Matthew Heaney) Subject: Rules for Representation of Subtypes Date: 1996/09/22 Message-ID: #1/1 X-Deja-AN: 184659757 content-type: text/plain; charset=ISO-8859-1 organization: Estormza Software mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-09-22T00:00:00+00:00 List-Id: I've always been curious about the rules for representation of subtypes. For example, if I make a declaration like this: A_Small_Integer : Integer range 0 .. 255; -- assume type Integer is 4 bytes then is an implementation allowed to use fewer than 4 bytes to represent A_Small_Integer? Suppose I'm on a Unix system and I do this read (fd, A_Small_Integer'Address, 4); If the representation of A_Small_Integer is only 1 byte, then obviously I'm in trouble. Am I required to specify the size of objects? A_Small_Integer : Integer range 0 .. 255; for A_Small_Integer'Size use 32; -- required? matt mheaney@ni.net -------------------------------------------------------------------- Matthew Heaney Software Development Consultant mheaney@ni.net (818) 985-1271