Skip to main content
Skip table of contents

convertToInteger() Operation for Strings

Syntax

set anInteger = aString.convertToInteger()
set anInteger = convertToInteger(LITERAL)

Semantics

Converts the lexical representation of an integer (e.g. 12345) to an Integer type. The format used is: [+|-][nnnnn]
nnnnn may be any number of decimal digits (0-9). An empty string is converted to 0.

If the conversion is not possible, an error message is raised (for instance: NULL strings).

Substitutables

aString

Can be any variable or object attribute having the type String.  

LITERAL

String literal.

Examples

NONE
set anInteger = aString.convertToInteger(); 

ActionScript_Calculations_Example

Click here to download a simple example model that shows how to use Action Script to perform simple Integer, Float and DateTime calculations with Scheer PAS Designer.

JavaScript errors detected

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

If this problem persists, please contact our support.