Runtime evaluation/In an environment: Difference between revisions
Content added Content deleted
(clarify task: mention not using a global variable, avoid the 'provided code is a function' interpretation) |
(→{{header|Octave}}: changed into an imitation of python, more or less) |
||
Line 97: | Line 97: | ||
=={{header|Octave}}== |
=={{header|Octave}}== |
||
⚫ | |||
{{incorrect|Octave|Either do not use a global variable, or note that this is impossible.}} |
|||
⚫ | |||
⚫ | |||
endfunction |
|||
p = "x .* 2"; |
|||
a = calcit(p, [1:3]); |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
b = eval(p); |
|||
disp(b-a);</lang> |
disp(b-a);</lang> |
||