Jump to content

Address of a variable: Difference between revisions

added J
m (→‎[[#ALGOL 68]]: fix typo)
(added J)
Line 114:
100 cells allocate throw value buffer
42 buffer 20 cells + !
 
== {{header|J}} ==
 
J hides the details of pointers and memory allocation from the programmer, so it is rarely, if ever, neccesary to do this. However, for those times when there is no better substitute, J provides access to these low-level details:
 
var =: 52 NB. Any variable (including data, functions, operators etc)
var_addr =: 15!:6<'var' NB. Get address
new_var =: 15!:7 var_addr NB. Set address
 
=={{header|Oberon-2}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.