val - convert string to numeric value
struct string *s;
Val returns a value converted from the string pointed to by s.
The conversion is performed with atobasic(io). The string is expected
to begin with a properly formatted BASIC numeric constant. The string
may contain any other characters beyond this point provided
they do not appear to be part of the constant. The characters interpreted
are only those which are appropriately formatted.
This function implements the BASIC VAL function.
Zero is returned if a properly formatted numeric constant is not present
at the beginning of the string.
Error 6 (Overflow) is generated if the value would overflow (a double).
The Basmark QuickBASIC Programmerís Manual