10-17-2022, 09:44 PM
(10-17-2022, 08:15 PM)Kernelpanic Wrote: It says "syntax error", so one should be able to fix it. To do this, however, one would first have to know what kind of error is actually meant in order to use the correct syntax. At the moment I don't think really that is a real bug, just a "know how".
But today I don't feel like it anymore, it was a strenuous day.
Syntax error . . . but what kind?
It's a misuse of FUNCTION. See the below:
Code: (Select All)
foo
Function foo
foo = 3
End Function
Now, doesn't that produce the *exact* same error as you're seeing?
It sure is!!
WHY??
Because FUNCTIONS *have* to be returned to a variable or used in conjecture with a SUB style command such as PRINT.
x = foo would fix the problem completely.
Code: (Select All)
x = foo
Print x
Function foo
foo = 3
End Function
PRINT foo would also fix the problem competely.
Code: (Select All)
Print foo
Function foo
foo = 3
End Function
SUBs are called directly as they do something. FUNCTIONs return a value.