VAL (str-exp)

Converts a string such as "123.45" into the corresponding REAL number. If it is desired to convert the number into an INTEGER number, the INT function must be used. If the str-exp cannot be converted into a REAL number, the value 0 will be returned.

Program Example

00100 REM The VAL function
00110 A0$ = "674.9875"
00120 LET B0 = VAL(A0$)
00130 PRINT BO
00140 END

Try it