From: Keith Thompson <kst@cts.com>
Subject: Re: Representation clause in records?
Date: 1999/02/06
Date: 1999-02-07T02:17:27+00:00 [thread overview]
Message-ID: <yeciudfvtxl.fsf@king.cts.com> (raw)
In-Reply-To: 36BC1760.B1F55E8C@mediaone.net
Steven Hovater <nh-ho@mediaone.net> 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 <http://www.ghoti.net/~kst>
Will write code for food.
prev parent reply other threads:[~1999-02-06 0:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-02-05 0:00 Representation clause in records? Corey Minyard
1999-02-05 0:00 ` Keith Thompson
1999-02-06 0:00 ` Steven Hovater
1999-02-06 0:00 ` Keith Thompson [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox