Jump to content

Address of a variable: Difference between revisions

no edit summary
No edit summary
Line 1,239:
2 2
sin(x) + cos(x)</syntaxhighlight>
 
=={{header|M2000 Interpreter}}==
From version 12, Varptr() can return address for variables and array items.
 
<syntaxhighlight lang="m2000 interpreter">
module checkVarptr {
declare GetMem8 lib "msvbvm60.GetMem8" {Long addr, Long retValue}
long long x=1234567812345678&&, z
dim k(2,2,2) as long long
call GetMem8(VarPtr(x), VarPtr(z))
call GetMem8(VarPtr(x), VarPtr(k(1,0,1)))
print z=x
print k(1,0,1)=x
}
checkVarptr
</syntaxhighlight>
{{out}}
<pre>
True
True
</pre>
 
=={{header|Modula-2}}==
404

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.