Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
17
Task/Runtime-evaluation/Maxima/runtime-evaluation.maxima
Normal file
17
Task/Runtime-evaluation/Maxima/runtime-evaluation.maxima
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/* Here is how to create a function and return a value at runtime. In the first example,
|
||||
the function is made global, i.e. it still exists after the statement is run. In the second example, the function
|
||||
is declared local. The evaluated string may read or write any variable defined before eval_string is run. */
|
||||
|
||||
kill(f)$
|
||||
|
||||
eval_string("block(f(x) := x^2 + 1, f(2))");
|
||||
5
|
||||
|
||||
fundef(f);
|
||||
/* f(x) := x^2 + 1 */
|
||||
|
||||
eval_string("block([f], local(f), f(x) := x^3 + 1, f(2))");
|
||||
9
|
||||
|
||||
fundef(f);
|
||||
/* f(x) := x^2 + 1 */
|
||||
Loading…
Add table
Add a link
Reference in a new issue