iff x else …

Read(8) Label: iff, else,

Description:

iff statement.

Syntax:

iff 

x

else

… 

Note:

A code-block structure for conditional branching. Executes the iff block or the else block depending on the result of x and places the value of the last calculation cell in the branch actually executed into the cell containing iff – not the cell containing else.

 

Parameter:

x

A Boolean expression.

Example:

 

A

B

 

1

8

 

 

2

iff A1<0

 

A2 is the master cell.

3

 

="negative:"/A1

B2 contains value of the last calculation c ell in iff code block.

4

else

 

The cell holding else.

5

 

="positive:"/A1

B5 contains value of the last calculation c ell in else code block.

6

=A2

 

B5’s  condition is true, so the returned result is positive:8.

Related function:

if x else