Vanguard Software
Forecasting & Planning Solutions
Home Products Solutions Services Customers Partners Company
 
Applying science to business management

contents.gifindex.gifprev1.gifnext1.gif

eval

Format: eval( text )

Arguments: [text] text Text string containing any valid DScript expression(s)

Returns: [any] Result of evaluating the expression(s) text

Description: Eval compiles and evaluates a text string as a DScript command. If text contains a list of strings, a list of evaluated results is returned.

When you create a tree node that uses the eval primitive, the tree editor will not include references to nodes in the text argument as child branches. For example, the following tree displays only the node B as a child of A even though the node C is technically also a child.

dph00466.gif

To define node names in quoted text as child nodes, place a \+ immediately before the node name as in the following example:

dph00467.gif

The presence of \+ does not affect execution in any way. It is only a cue to the tree editor to interpret the following characters as a node name.

Examples: eval("2+3*4") = 14

eval("f(x):=x^2-4") = creates a function named f(x)

eval(["2+3","PI"]) = [5,3.142]

See Also: tonumber, tolist

  Demand Planning  |  Financial Forecasting
Forecasting Software  |  Strategic Planning Software  |  Decision Tree Software
Decision Support Software  |  Expert System Software  |  Online Surveys

Contact Us  |  Terms of Use  |  Privacy Policy  |  Site Map
Vanguard Software
© 2011 Vanguard Software Corporation
Print this page   Email this page to a friend