Address of a variable: Difference between revisions
Content deleted Content added
m Added to <10 category, corrected spelling |
m →{{header|Ada}}: added code highlighting |
||
Line 5: | Line 5: | ||
=={{header|Ada}}== |
=={{header|Ada}}== |
||
===Get The Address=== |
===Get The Address=== |
||
<ada> The_Address : System.Address; |
|||
I : Integer; |
I : Integer; |
||
The_Address := I'Address; |
The_Address := I'Address;</ada> |
||
===Set The Address=== |
===Set The Address=== |
||
Set the address of a variable to address A100 in hexadecimal |
Set the address of a variable to address A100 in hexadecimal |
||
<ada>I : Integer; |
|||
for I'Address use 16#A100#; |
for I'Address use 16#A100#;</ada> |
||
Set the address of one variable to the address of another variable, creating an overlay. |
Set the address of one variable to the address of another variable, creating an overlay. |
||
<ada>I : Integer; |
|||
J : Integer; |
J : Integer; |
||
For I'Address use J'Address; |
For I'Address use J'Address;</ada> |
||
=={{header|C sharp|C #}}== |
=={{header|C sharp|C #}}== |