Ada Programming/Attributes/'Position

From Wikibooks, open books for an open world
Jump to: navigation, search

Ada Lovelace 1838.jpg

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

[edit] Ada Reference Manual

Personal tools
Namespaces
Variants
Actions
Navigation
Community
Toolbox
Sister projects
Print/export