Address of a variable: Difference between revisions

m
→‎{{header|Oberon-2}}: Added syntax highlighting
m (→‎{{header|Oberon-2}}: Added syntax highlighting)
Line 1,356:
=={{header|Oberon-2}}==
===Get Address===
<syntaxhighlight lang="oberon2">
<pre>
VAR a: LONGINT;
VAR b: INTEGER;
Line 1,362:
b := 10;
a := SYSTEM.ADR(b); (* Sets variable a to the address of variable b *)
</syntaxhighlight>
</pre>
 
===Set Address===
<syntaxhighlight lang="oberon2">
<pre>
SYSTEM.PUT(a, b); (* Sets the address of b to the address of a *)
</syntaxhighlight>
</pre>
 
=={{header|OCaml}}==
40

edits