tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 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