real-value = REALVAL(string-value)
Converts a string containing a number into a real (floating-point) value.
Examples
Produces 3.14159.
Produces -42.75.
REM Using REALVAL for user input
INPUT str$
num# = REALVAL(str$)
PRINT "You entered "; num#
Notes
- Accepts decimal and optionally signed values.
- If the string cannot be parsed as a valid real number, an error is raised.
- Returns a 64-bit double-precision floating-point value.
- For integer conversion, use VAL.
See also: VAL · HEXVAL · OCTVAL · RADIX