I know they exists, but I can not find the command
Is like asigning a variable a value, but this value is untochable. In fact, the compiler changes the variable name with the variable value.
mysprite=7
drawsprite mysprite,x,y
will be compiled as
drawsprite 7,x,y
Damm alzheimer...
My first post :nw:
Hi ampos,
try
CONSTANT mysprite%=7
Note that you can later attempt to change the value in code (e.g. CONSTANT mysprite%=12) and the program will compile, but the value will not change. Referencing it without the CONSTANT keyword will generate a compile-time error.
Actually, attempting to change a CONSTANT will generate error: assignment of read-only variable `__GLBASIC__ compiler error.
And why the hell it is not in the user manual? :rant:
Because it's not stable in all ends. If you're tricky, you can change the value. :-[
QuoteIf you're tricky, you can change the value.
I've never been able to :) If its still possible then most require some very tricky fiddling :)
I think passing it BYREF to a function might be able to.