Last modified on 1 September 2014, at 18:13

Ada Programming/Attributes/'Address


Ada Lovelace 1838.jpg

DescriptionEdit

X'Address is an Ada attribute where X is any object, program unit, or label, RM 13.3(10/1).

'Address may be used to return the address of the first element allocated to X. 'Address may also be used to set the address of X for stand-alone objects and program units, RM 13.3(12).

ExampleEdit

   -- A 32 bit hardware register
   Device_Input_Value: Interfaces.Unsigned_32;
   for Device_Input_Value'Address use To_Address (16#8000_05C4#);

It's not recommended to use Integer_32 in this case.

See alsoEdit

WikibookEdit

Ada Reference ManualEdit