LET causes warnings and errors... but why?

Previous topic - Next topic

mentor

Hi,
I have this code:

Code (glbasic) Select
LET a=5
PRINT a, 100, 100
SHOWSCREEN
MOUSEWAIT
END


And these warnings and errors:
Code (glbasic) Select
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.7.861 SN:8bee8179 - 2D, WIN32
"Hello World.gbas"(3) warning : probably unassigned variable : a
"Hello World.gbas"(3) error : variable is not explicitly defined : a


My question - why? Everything seems to be fine... LET command causes that, but why? What is wrong here?

Kitty Hello

you have to make a LOCAL variable "a" first, or disable explicit declarations.

The LET command is pretty outdated now.

Moru

Let was outdated when I started with basic 25 years ago