Skip to main content
Skip table of contents

convertToFloat() Operation for Strings

Syntax
NONE
set aFloat = aString.convertToFloat()
set aFloat = convertToFloat(LITERAL)
Semantics

Converts the lexical representation of a float (e.g. 1.2345) to a Float type. The float string is considered until a non-numeric character is found (digits, signs, E and e are considered valid numeric characters for this parameter as specified in the format). The format used is: [white spaces][+|-][nnnnn][.nnnnn][e|E[+|-]nnnn]
White spaces are any tab or space character. nnnnn may be any number of digits.

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 aFloat = aString.convertToFloat();
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.