Skip to main content
Skip table of contents

convertToInteger() Operation for Booleans

Syntax

set anInteger = aBoolean.convertToInteger()
set anInteger = convertToInteger(true|false)

Semantics

Converts boolean values to integers. true is converted to 1, false to 0.

Substitutables

aBoolean

Can be any variable or object attribute having the type Boolean

Examples

Converts the value of the boolean variable to an integer having the value 0 or 1.

NONE
set i1 = b.convertToInteger(); 

Assigns 0 to integer i2 .

NONE
set i2 = convertToInteger(false); 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.