Address of a variable: Difference between revisions
Content deleted Content added
m →[[#ALGOL 68]]: fix typo |
added J |
||
Line 114: | Line 114: | ||
100 cells allocate throw value buffer |
100 cells allocate throw value buffer |
||
42 buffer 20 cells + ! |
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}}== |
=={{header|Oberon-2}}== |