PDA

View Full Version : Variable not defined or misspelled Keyword



DirectuX
27-10-2019, 20:37
Hi Eros,

just to report that this error message is inconsistent :


when you forget USES "CONSOLE"
you get a useful message : Unknown Keyword SUGGESTION: consider adding the following line in your code: USES "CONSOLE" (err code 18)

but if you forget USES "MATH"
you get : Variable not defined or misspelled Keyword (err code 30)

this last err message is confusing.

primo
28-10-2019, 08:27
it is may be No Bug, because


USES "Math"
USES "CONSOLE"
print Pi
waitkey

Pi here is defined in the Math Module and will print 3.14159265358979323
But:


USES "CONSOLE"
double Pi = 3.14159265358979323
print Pi
waitkey
will print 3.14159265358979323

DirectuX
28-10-2019, 10:34
Hi Primo,
I didn't mean a bug, just that the error message given by thinBasic is leading to confusion.

Petr Schreiber
01-11-2019, 19:58
Hi Primo,

I investigated the issue - it seems that in general none of the symbols from Math module is recognised.

It would be definitely nice to have it fixed.


Petr