-
Notifications
You must be signed in to change notification settings - Fork 0
VAL
Andrew Owen edited this page May 30, 2023
·
2 revisions
value = VAL(string)
Returns the numeric value of the string expression string. See the section on numeric literals for the recognised number formats.
- Spaces before a number are ignored:
VAL(" 10")returns10. But unlike Microsoft BASIC, spaces inside a number are not ignored. - Unlike Microsoft BASIC, expressions inside the string expression are also
evaluated. For example,
VAL "5+5"returns10andVAL "foo"returns the value of variablefoo. - Expressions between curly braces
{and}are not evaluated, but their syntax is checked upon entering. They are interpreted as strings that can be passed to VAL for actual evaluation.
string has a number value: Type mismatch.
- Press
RETURNto return to this menu. - Enter the name of a
TOPICto display it. - Enter
EXITto return to BASIC.
Choose from the following topics: