eval

Command: eval


Synopsis
string eval -> obj1 ... objn

Description

Reads a string and evaluates its content. The resulting objects are
pushed onto the stack.

As in regular batch mode the interpreter reads tokens from a
stream a string stream in this case and immediately executes the
incoming language constructs.

A similar function to eval also occurs in Python.

File
lib/sli/typeinit.sli
Author
Jochen M. Eppler
FirstVersion
June 2013
Examples

(1 2 add) eval --> 3
([1 2 3] /peter 5 def) eval --> [1 2 3]

SeeAlso