Hi Gernot
Could I request two teeny additional features for GLB in the editor and compiler to be added to the wish list?
First one is could you add a strict option in GLB to fail compilation with an error instead of a warning when a variable has not been declared. Make this an option that is off by default so not to cause any compatibility problems with older code and those that don't want it. See reasons why below.
Second one is could you add an option to the editor to not change the case of what you type when it detects a reserved word. And add a button to reformat the current code window (force case, spacing, indenting etc) so you can tidy up your code when you need to. I know some people will like it, so again as an option, but for me it tends to get in the way. The colour coding is not a problem (and is helpful) but the change to UPPERCASE changes your program.
The reason for the two above requests are that often, while in a procedure for example, I declare a local variable that starts with a reserved word, such as MAX for example, often GLB will jump in and change that part to upper case. For example if I have a variable called "maxt" it I press del key to remove the 't' then max becomes MAX. If I leave it as-is, and now have a new variable called MAXt, a different variable to maxt. See code below.
Example:
FUNCTION test1:
LOCAL maxt
maxt=0
MAXt=1
PRINT maxt + " " + MAXt,0,0
SHOWSCREEN
KEYWAIT
ENDFUNCTION
in the compilation log (but only when in debug mode):
"test.gbas"(4) warning : implicitly created GLOBAL : MAXt
The output from the above is "0 1" because we've now got two different variables. If you have debug mode off you don't even see the warnings.
Would it be possible to add these features? The strict option would stop any errors being introduced and if we could turn off auto formatting we could avoid the annoying renaming (by change to uppercase) of variables when we don't want them to. It's a pain to avoid every reserved word as part of a variable name or to retyping in lowercase.