Breadcrumbs

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]
nnnnnmay 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

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.

📗