Parse the leading number in a string. Stops at the first invalid character; returns 0 when the string does not start with a number.
number = VAL(string$)
string$ - leading spaces are skipped; an optional leading ‘-’ is honoured
See also STR$.
Example:
PRINT VAL(" -12.5abc") ' -12.5
Source: docs/help/val.txt inmmcore. On the computer, typeHELP VAL.