val

Converts numeric characters that occur at the beginning of a
string to a number. If conversion fails, returns zero.

val(String) → returns Numeric

val Argument Reference

String
Required

A string or a variable that contains one

Examples sample code invoking the val function


simple example Using val()

To converts numeric characters from string

SomeString = "120test12sstring";
writeOutput( val(SomeString) );

Expected Result: 120


simple example Using val()

To converts numeric characters from string

SomeString = "string98";
writeOutput( val(SomeString) );

Expected Result: 0


Fork me on GitHub