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,2d939a7e1280607b X-Google-Attributes: gid103376,public From: Keith Thompson Subject: Re: Representation clause in records? Date: 1999/02/06 Message-ID: #1/1 X-Deja-AN: 441534631 References: <36BC1760.B1F55E8C@mediaone.net> X-Complaints-To: usenet@nusku.cts.com X-Trace: nusku.cts.com 918353847 24433 198.68.168.21 (7 Feb 1999 02:17:27 GMT) Organization: CTS Network Services NNTP-Posting-Date: 7 Feb 1999 02:17:27 GMT Newsgroups: comp.lang.ada Date: 1999-02-07T02:17:27+00:00 List-Id: Steven Hovater writes: > The only rep spec I"ve seen is an alignment clause at the beginning > of the record, e.g. (best I can recall...) > type foo is record > for foo'address use at mod 32; > begin > blah : integer16; > more_blah : integer16; > end record; No, the syntax you're thinking of is: type Foo is record Blah : Integer16; More_Blah : Integer16; end record; for Foo use record at mod 4; -- Storage units, not bits Blah at 0 range 0 .. 15; -- (the component clauses More_Blah at 2 range 0 .. 15; -- are optional) end record; The alignment clause is within the record representation clause, not the record type declaration. (You can also specify the alignment with "for Foo'Alignment use 4;".) -- Keith Thompson (The_Other_Keith) kst@cts.com <*> San Diego, California, USA Will write code for food.