Specifications

Chapter 15. Function Reference
386
Syntax:
VAL(stringexpression)
Parameter:
stringexpression
A string expression which represents a decimal number.
Description:
VAL converts the string specified by stringexpression into a numeric value.
If
stringexpression is nonnumeric, VAL returns the value 0.
PRINT VAL("ABC")
If stringexpression contains a nonnumeric in midstream, VAL converts the
string until it reaches the first character that cannot be interpreted as a numeric.
PRINT VAL("1.2E-3ABC")
The STR$ function has the opposite capability to VAL.
Reference:
VALue String function
VAL
Converts a string into a numeric value.
Functions:
ASC and STR$
0
1.200000000E-03