Vanguard Software
Forecasting & Planning Solutions

contents.gifindex.gifprev1.gifnext1.gif

Parentheses

Format: ( x, y, ... )

Arguments: [any] x, y Any valid expression(s)

Returns: [any] The value of the last argument evaluated

Description: Parentheses are used to specify the order of evaluation for arithmetic expressions or to create a list of expressions to evaluate. If a list of expressions is evaluated, the value of the last expression is returned.

( ) and { } are similar in that they both evaluate a list of expressions. However, nodes created while evaluating an expression in ( ) are global while those created within { } cease to exist outside the braces.

In most cases braces { } should be used instead of parentheses ( ) when creating procedure that uses local variables. Braces ensure that all nodes created within the braces are local and will not overwrite or in any way interfere with other nodes having the same name.

Examples: (2+3)*4 = 20

2+(3*4) = 14

(x:=123,y:=x*2,y) = 246  (nodes x and y remain defined outside parentheses)

See Also: Procedure, List Literal

  Forecasting Software  |  Strategic Planning Software  |  Decision Support Software
Decision Tree Analysis  |  Monte Carlo Simulation Software  |  Risk Analysis Software
Portfolio Analysis  |  Expert System Software  |  Website Surveys

Contact Us  |  Terms of Use  |  Privacy Policy  |  Site Map
Vanguard Software
© 2009 Vanguard Software Corporation
Home Products Solutions Services Customers Partners Company
Vanguard
Applying science to business management
Vanguard
Print this page   Email this page to a friend