eval_string

eval_string — evaluates a string.

Synopsis

eval_string (string, use_parser?)

		

Arguments

string

A string.

use_parser

t specifies that the string should be parsed as Gamma code instead of LISP code.

Returns

The result of evaluating the string as if it were a Lisp expression.

Description

This function evaluates a string as if it were a Lisp expression, regardless of whether the file syntax is Gamma or Lisp.This function could be written in Lisp as:

(defun eval_string (string) (let ((x (parse_string string))) (eval x)))

Example

Gamma> eval_string("(+ 5 6)");
11
Gamma> testvalue = 75;
75
Gamma> eval_string("testvalue");
75
Gamma>