Jensen's Device: Difference between revisions
m
→{{header|Wren}}: Changed to Wren S/H
m (→{{header|Sidef}}: updated output) |
m (→{{header|Wren}}: Changed to Wren S/H) |
||
Line 1,918:
=={{header|Wren}}==
As Wren doesn't support call by name, call by reference nor pointers we need to 'box' the global numeric variable 'i' and use a function for 'term' to simulate Jensen's device. This works because all user defined types are reference types and functions can capture external variables.
<syntaxhighlight lang="
construct new(v) { _v = v }
v { _v }
Line 1,943:
5.1873775176396
</pre>
=={{header|Yabasic}}==
|