Address of a variable: Difference between revisions

Content added Content deleted
(→‎{{header|Lua}}: added Lua solution)
Line 892: Line 892:


=={{header|FutureBasic}}==
=={{header|FutureBasic}}==
<lang futurebasic>
<lang futurebasic>window 1
include "ConsoleWindow"


dim as short i : i = 575
short i = 575
dim as ptr j : j = NULL
ptr j


j = @i
j = @i


print "Adddress of i ="; j
printf @"Address of i = %ld",j
print "Value of i ="; [j]
print @"Value of i = ";peek word(j)

</lang>
HandleEvents</lang>


Output:
Output:
<pre>
<pre>
Adddress of i = 902164
Adddress of i = 4330713552
Value of i = 575
Value of i = 575
</pre>
</pre>