GLBasic forum

Main forum => Bug Reports => Topic started by: AndyH on 2008-Feb-13

Title: TYPE properties and Function labels conflict
Post by: AndyH on 2008-Feb-13
Put this code in

Code (glbasic) Select
TYPE test
typaa
ENDTYPE
Notice the lower case aa.

Now add this code, notice the upper case AA:

Code (glbasic) Select
FUNCTION typAA:

ENDFUNCTION
.

and the typaa in the TYPE changes blue (or the colour of your functions in the editor) and is now typAA and your code will not compile.

Same happens if you just enter typAA: for a label.
Title: TYPE properties and Function labels conflict
Post by: bigsofty on 2008-Feb-13
Even in a different case, disallowing a type name to be the same as a function name, might  not be such a bad thing?
Title: TYPE properties and Function labels conflict
Post by: AndyH on 2008-Feb-13
Yea, I guess it is not good practice to have type or variable names the same as labels or function names, but GLB is case sensitive so it shouldn't conflict in this case - it's the editor that's doing it.

Easy solution is to make sure you use unique names for everything as you say. :)