In BBC BASIC an expression can return a number or a string. An example of an expression which returns a number is '1 + 2' which returns the number '3'. An example of an expression which returns a string is '"one" + "two"' which returns the string '"onetwo"'.jeroen_soutberg wrote: ↑Mon 19 Feb 2024, 12:43 I am not sure I see the value of the string version. Or do I miss something?
EVAL passes the supplied argument to the 'expression evaluator', hence depending on that argument the expression evaluator may return a number or a string. Here's an example of when EVAL returns a number:
Code: Select all
expression$ = "1 + 2"
number = EVAL(expression$)
Code: Select all
expression$ = """one"" + ""two"""
string$ = EVAL(expression$)