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); 

Some Examples

Boolean Value

Integer Value

true

1

false

0

ActionScript_TypeConversions_Example

Click here to download a simple example model that different possibilities for type conversions between Float, Integer, String, and Boolean types in Scheer PAS Designer.

JavaScript errors detected

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

If this problem persists, please contact our support.