Skip to main content
Skip table of contents

convertToFloat() Operation for Strings

Syntax

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

Substitutables

aString

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

LITERAL

String literal.

Examples

NONE
set aFloat = aString.convertToFloat();

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.