eval (s_exp)
The result of evaluating the argument. Note that the argument is also evaluated as part of the function calling mechanism.
The eval function forms the basis for running a Gamma program. Every data type has a defined behavior to the eval call. These are:
The eval function can be useful when constructing code which must be conditionally executed at a later date, and passed about as data until that time. It may be useful to provide a piece of code as an argument to a generic function so that the function can evaluate it as part of its operation.
![]() | Note: The # operator is used to protect an expression from evaluation. See Quote Operators for more information. |
Gamma> a = 5; 5 Gamma> b = #a; a Gamma> b; a Gamma> eval(b); 5 Gamma>
Copyright © 1995-2012 by Cogent Real-Time Systems, Inc. All rights reserved.