Address of a variable
Address of a variable
You are encouraged to solve this task according to the task description, using any language you may know.
You are encouraged to solve this task according to the task description, using any language you may know.
Demonstrate how to get the address of a variable and how to set the address of a variable.
Ada
Get The Address
The_Address : System.Address; I : Integer; The_Address := I'Address;
Set The Address
Set the address of a variable to address A100 in hexidecimal
I : Integer; for I'Address use 16#A100#;
Set the address of one varible to the address of another variable, creating an overlay.
I : Integer; J : Integer; For I'Address use J'Address;