13.5.2 Storage Place Attributes
From OC Systems Wiki!
Static Semantics
For a component C of a composite, non-array object R, the storage place attributes are defined:
- R.C'Position
- Denotes the same value as R.C'Address - R'Address. The value of this attribute is of the type universal_integer.
- R.C'First_Bit
- Denotes the offset, from the start of the first of the storage elements occupied by C, of the first bit occupied by C. This offset is measured in bits. The first bit of a storage element is numbered zero. The value of this attribute is of the type universal_integer.
- R.C'Last_Bit
- Denotes the offset, from the start of the first of the storage elements occupied by C, of the last bit occupied by C. This offset is measured in bits. The value of this attribute is of the type universal_integer.
Implementation Advice
If a component is represented using some form of pointer (such as an offset) to the actual data of the component, and this data is contiguous with the rest of the object, then the storage place attributes should reflect the place of the actual data, not the pointer. If a component is allocated discontiguously from the rest of the object, then a warning should be generated upon reference to one of its storage place attributes.
Copyright © 1992,1993,1994,1995 Intermetrics, Inc.
Copyright © 2000 The MITRE Corporation, Inc.
Ada Reference Manual