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,9dec3ff1604723d9 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!news-stoc.telia.net!news-stoa.telia.net!telia.net!masternews.telia.net.!newsc.telia.net.POSTED!not-for-mail From: =?ISO-8859-1?Q?Bj=F6rn_Persson?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 X-Accept-Language: sv, sv-se, sv-fi, en-gb, en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Bitmanipulation in Ada References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Message-ID: Date: Wed, 18 Aug 2004 22:59:22 GMT NNTP-Posting-Host: 217.209.116.179 X-Complaints-To: abuse@telia.com X-Trace: newsc.telia.net 1092869962 217.209.116.179 (Thu, 19 Aug 2004 00:59:22 CEST) NNTP-Posting-Date: Thu, 19 Aug 2004 00:59:22 CEST Organization: Telia Internet Xref: g2news1.google.com comp.lang.ada:2822 Date: 2004-08-18T22:59:22+00:00 List-Id: Martin Dowie wrote: > 2) Address clause to 'overlay' 2 variables at the same address; >=20 > procedure Foo (Y : Unsigned_8) is > X : Array_8; > for X'Address use Y'Address; > begin > .... Y should probably be declared "in out" here. > 3) Variant record with a representation clause; >=20 > type Variant (Is_Array : Boolean :=3D False) is > record > case Is_Array is > when False =3D> > U : Unsigned_8; > when True =3D> > A : Array_8; > end case; > end record; > for Variant use > record > U at 0 range 0 .. 7; > A at 0 range 0 .. 7; > end record; If you turn off the discriminant check. --=20 Bj=F6rn Persson PGP key A88682FD omb jor ers @sv ge. r o.b n.p son eri nu