Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Ada Programming/Attributes/'Address

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Attributes 'Address __TOC__ Attribute Definition Clause X'Address is an Ada attribute where X is any object, program unit, or label, RM 13.3(10/1). [A program unit is either a package, a task unit, a protected unit, a protected entry, a generic unit, or an explicitly declared subprogram other than an enumeration literal, RM 10.1(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). A 32 bit hardware register Device_Input_Value: Interfaces.Unsigned_32; for Device_Input_Value'Address use System.Storage_Elements.To_Address (16#8000_05C4#); It's not recommended to use Integer_32 in this case. Aspect Specification The address may also be specified directly when declaring the variable using an aspect declaration:Device_Input_Value : Interfaces.Unsigned_32 with Address => System.Storage_Elements.To_Address (16#8000_05C4#); See also Wikibook Ada Programming Ada Programming/Attributes Ada Programming/Attributes/'Alignment Ada Reference Manual 13 3 Operational and Representation Attributes K Language-Defined Attributes Address Address