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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f9957894e0bdf128 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad.newshosting.com!newshosting.com!newspeer.monmouth.com!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: How to put 200 into an integer sub-type of 16 bits (code included) Date: Thu, 15 Jan 2009 16:21:23 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <407ae64d-3cb3-4310-b59e-f1bbae9910a5@t39g2000prh.googlegroups.com> <71gqm49eatq868htrvd7eghm3m8su8kcbl@4ax.com> <7b017de2-951a-414a-8290-111353fe02f8@r15g2000prd.googlegroups.com> <46075a57-3445-44ae-b40e-dcad9e0e1fcf@v18g2000pro.googlegroups.com> <3d951e6e-c87d-4667-94ab-fcb312288e1d@r37g2000prr.googlegroups.com> <12837a65-dd6e-493f-91e8-4140d67237c2@z28g2000prd.googlegroups.com> <44178c17-a27b-48ff-8ff1-17d04d362ce4@a26g2000prf.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1232054483 13994 192.74.137.71 (15 Jan 2009 21:21:23 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Thu, 15 Jan 2009 21:21:23 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:uLK4QKpJgdmTpxf3ET4cJvGjIWw= Xref: g2news1.google.com comp.lang.ada:3354 Date: 2009-01-15T16:21:23-05:00 List-Id: Adam Beneschan writes: > Wow, that's confusing when looking at 13.1(8). That says, "A > representation item that names a subtype is either subtype-specific > (Size and Alignment clauses) or type-related (all others). Subtype- > specific aspects may differ for different subtypes of the same type". It says the "aspects may differ". That is, different subtypes can have different sizes and alignments. It does not say that you can specify different sizes and alignments. I agree that it's confusing! For: subtype Byte is Natural range 0 .. 255; Byte'Size = 8. You can write "pragma Assert(Byte'Size = 8);" if you want to clarify that fact. - Bob