VAL

This command analyzes a string (" numeric_string") and returns its numeric value.

If the string contains any non-numeric characters, this command returns the number 0.

Syntax

VAL " numeric_string"

Return value

This command returns a number.

Notes

The numeric_string must be correctly formatted according to the data entry workstation's regional options. If the numeric string does not match the data entry workstation's regional options, use the LOCAL_S command.

Examples

VAL "abc123"

This formula returns the number 0.

VAL "123abc"

This formula returns the number 0.

VAL "123.4"

This formula returns the number 123.4 (one hundred twenty-three and four-tenths) when the workstation's Windows Regional Options are set to "English (United States)".

VAL "123,4"

This formula returns the number 123,4 (one hundred twenty-three and four-tenths) when the workstation's Windows Regional Options are set to "Italian (Italy)".

VAL (LOCAL_S "123.4", ".", ",")

This formula returns the number one hundred twenty-three and four-tenths for all Windows Regional Options on the workstation.