( ) Parentheses

( ) Parentheses

Welcome to our Knowledge Base

Documentation | Blog | Demos | Support

< All Topics
Print

( ) Parentheses

( ) Parentheses

Alters the order of evaluation of expressions, or groups expressions, or both.

Syntax #1

Alters the order of evaluation in expressions.

(expression)

Within a larger expression, a single expression placed in parentheses changes the order of execution (which normally depends on the precedence of operators).

Parameters

expression

an arithmetic or logic expression

Syntax #2

Groups expressions.

(expression1[«,expression2»])

Parentheses can be used to group several expressions, each of which is evaluated; the grouped expression takes on the value of the last individual expression in the group.

Parameters

expression1

any expression

expression2

any expression

Comments

Use parentheses to group one or more expressions, each of which is evaluated. The grouped expression takes on the value of the last expression in the group.

Examples

7 * 8 – 5^2

31

7 * (8 – 5)^2

63

not Salary > 30000 or Age < 25

Result: Logically true when Salary is 29,000 and Age is 21.

not (Salary > 30000 or Age < 25)

Result: Logically false when Salary is 29,000 and Age is 21.

w = ( (let x = 5+3), (let y = 5-3), (let z = 5^3), 5.0/3.0 )

Values: x=8, y=2, z=75, w=1.7

 

See Also

Conventions

How To Construct Logic Expressions

How To Use Logic Expressions

Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.

Leave a Reply

Your email address will not be published. Required fields are marked *

en_CAEnglish