Skip to main content
Skip table of contents

convertToInteger() Operation for Strings

Syntax
NONE
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). Empty string is converted to 0.

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

SubstitutablesaString Can be any variable or object attribute having the type String.  
LITERAL String literal.
Examples
NONE
set anInteger = aString.convertToInteger(); 
For a UML example, refer to Type Converter Operations.
JavaScript errors detected

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

If this problem persists, please contact our support.