evaluate()
Evaluates an AEL expression and returns the result. The string passed must be a valid AEL expression. The value of the expression is returned as well as stored in the global variable EvaluationResult.
AEL is always interpreted in the context of a vocabulary of definitions which are used to resolve identifier references. Whenever a variable or function name is used in the AEL program, the context vocabulary is searched for an existing definition. New variables and function definitions are added to the context vocabulary as well. The optional second argument allows the context to be overridden for this function by providing the name of the desired vocabulary.
In the design environment, two contexts are important: SimCmd and CmdOp. Generally SimCmd is the context for any AEL files loaded during program initialization and when opening a project. The context is CmdOp when interpreting menu commands and in the Command Line dialog box. SimCmd is a superset of CmdOp, so not all definitions in SimCmd are available from the Command Line dialog without specifying the context SimCmd specifically. Returns: Value of the expression.
Syntax:
evaluate( string, [context] );
where
string is the text of the AEL expression.
context is the name of vocabulary context for evaluation of the expression.
Example:
decl x; x = evaluate( "3 * 8" ); // sets x = integer value 24 // also sets EvaluationResult to 24
Where Used:
Measurement Expressions (Data Display equations and Schematic MeasEqns), Schematic, Layout, Simulation, GUI
Privacy
Statement
|
Terms of Use
|
Legal |
Contact Us
|
© Agilent 2000-2008 ![]()