Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Eval_string Calculator

Eval_string

Function: eval_string (<str>) Parse the string <str> as a Maxima expression and evaluate it. The string <str> may or may not have a terminator (dollar sign $ or semicolon ;). Only the first expression is parsed and evaluated, if there is more than one.

block([sn],sn(x,p) := block([s,a,b,c],s: printf(false, eval_string(concat(ascii(34),ascii(126),ascii(101),ascii(34))), x),a: split(s,eval_string(concat(ascii(34),ascii(69),ascii(34)))),b: a[1],c: sremove(eval_string(concat(ascii(34),ascii(43),ascii(34))),a[2]),fpprintprec:p, return(concat(eval_string(b),eval_string(concat(ascii(34),ascii(69),ascii(34))),c)) ),is("10.76"= sn(10.7620000000,5)));

Complain if <str> is not a string.

Examples:

          (%i1) eval_string ("foo: 42; bar: foo^2 + baz");
          (%o1)                       42
          (%i2) eval_string ("(foo: 42, bar: foo^2 + baz)");
          (%o2)                   baz + 1764

See also parse_string.

(%o1)                                true
(%i2) 

Eval_string Example

Related Examples

string

int:4;

string:32;

int+int+string+string...

Calculate

string

:lisp (setf my-string...

:lisp my-string;

Calculate

string

string(+43867/5109094...

Calculate

string

a(n):=1/9*(10^n-1);

a50:a(50);

for d in divisors(a50...

Calculate

string

string(( -(spotRate+f...

Calculate

string

a+c+b;

string(a+c+b);

Calculate

string

string(+167/722192889...

Calculate

string

string(-307/484989120...

Calculate