Ada Programming/Attributes/'Position
From Wikibooks, open books for an open world
Contents |
[edit] Description
'Position is a record type component attribute. It represents the address offset of the component from the beginning of the record. The value returned is represented in storage units, which is machine-specific.
[edit] Example
If you declare:
type My_Record is record Component1 : Integer; Component2 : Integer; end record;
then
My_Record.Component2'Position = 1
This assumes an integer occupies one storage unit.
[edit] See also
[edit] Wikibook
- Ada Programming
- Ada Programming/Attributes
- Ada Programming/Attributes/'Bit_Order
- Ada Programming/Attributes/'First_Bit
- Ada Programming/Attributes/'Last_Bit