[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

50. eval_string


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

50.1 Definitions for eval_string

Function: eval_string (str)

Parse the Maxima string str as a Maxima expression and evaluate it. str is a Maxima string. It 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.

Complain if str is not a Maxima string.

Examples:

 
(%i1) load("eval_string")$

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

To use this function write first load("eval_string"). See also parse_string.

Function: parse_string (str)

Parse the Maxima string str as a Maxima expression (do not evaluate it). str is a Maxima string. It may or may not have a terminator (dollar sign $ or semicolon ;). Only the first expression is parsed, if there is more than one.

Complain if str is not a Maxima string.

Examples:

 
(%i1) load("eval_string")$

(%i2) parse_string ("foo: 42; bar: foo^2 + baz");
(%o2)                    foo : 42
(%i3) parse_string ("(foo: 42, bar: foo^2 + baz)");
                                   2
(%o3)          (foo : 42, bar : foo  + baz)

To use this function write first load("eval_string"). See also eval_string.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Robert Dodier on December, 21 2006 using texi2html 1.76.