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

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

  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