-
Notifications
You must be signed in to change notification settings - Fork 0
VALS
Andrew Owen edited this page May 30, 2023
·
1 revision
repr = VAL$(string)
Evaluates a string as a string expression. For example
10 INPUT a$, x$
20 PRINT VAL$ a$
The string value assigned to a$ should be an expression using x$. For example,
"x$+x$". A string value is then assigned to x$, for example "yo". VAL$ strips
the quotes of the value of a$ to get x$+x$ and evaluates it using the value
assigned to x$ displaying the result yoyo.
- This function is not present in Microsoft BASIC. It is very useful for
creating recursive functions, if used together with
ANDapplied to string arguments, allowing for selective evaluation. - 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.
- Press
RETURNto return to this menu. - Enter the name of a
TOPICto display it. - Enter
EXITto return to BASIC.
Choose from the following topics: