IIF

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Core Language > BuiltIn Functions > Numeric functions >

IIF

 

Description

 

Return TruePartNumericExpression of FalsePartNumericExpression depending on Num_Expression avaluates to True or False.

 

Syntax

 

n  = IIF(Num_Expression, TruePartNumericExpression, FalseNumericExpression)

 

Returns

 

Number

 

Parameters

 

Name

Type

Optional

Meaning

Num_Expression

Numeric

No

Any numerical or logical expression

TruePartNumericExpression

Numeric

No

If Num_Expression will evaluate to %TRUE, TruePartNumericExpression will be evaluated and its value returned

FalseNumericExpression

Numeric

No

If Num_Expression will evaluate to %FALSE, FalsePartNumericExpression will be evaluated and its value returned

 

Remarks

 

Restrictions

 

See also

 

Numeric functions, IIF$,

 

Examples