Code: Select all
EnableExplicit
Define abc.q
abc.q = 2
abc = 5Code: Select all
EnableExplicit
Define abc.q
abc.q = 2
abc.i = 5With type abc
Stop, abc - variable's name, not variable type
// Moved from "Bugs - Windows" to "Coding Questions" (Kiffi)
Code: Select all
EnableExplicit
Define abc.q
abc.q = 2
abc = 5Code: Select all
EnableExplicit
Define abc.q
abc.q = 2
abc.i = 5
This is short for: “The following variable is already declared with another type: abc.”Sergey wrote: Tue Jan 13, 2026 10:39 am[13:40:14] [COMPILER] Line 4: Variable already declared with another type: abc.Code: Select all
EnableExplicit Define abc.q abc.q = 2 abc.i = 5
The message does not write that abc is the variable's type.Sergey wrote: Tue Jan 13, 2026 10:39 am With type abc![]()
Stop, abc - variable's name, not variable type
Technically, this should be sufficient:
Code: Select all
Line 4: Variable already declared: abc
That is more clear.Fred wrote: Wed Jan 14, 2026 9:54 am Changed into:
Variable 'abc' already declared with another type.
When you use a variable without extension, it is the extension type that was used when you defined it that will be used; you defined it as .q so the abc (without .q) is the same as abc.q, and if you run it with Debug abc and Debug abc.q you will see that you have the same result: 5EnableExplicit
Define abc.q
abc.q = 2
abc = 5
Here you have an error, because you have already defined abc as type .q so trying to define abc as type .i is a name mismatching: you cannot change the type of variable on the fly.EnableExplicit
Define abc.q
abc.q = 2
abc.i = 5
When speaking about the error message, yes, that is more clear, but "Variable 'abc' already declared as type .q' is more precise...Little John wrote: Wed Jan 14, 2026 11:28 amThat is more clear.Fred wrote: Wed Jan 14, 2026 9:54 am Changed into:
Variable 'abc' already declared with another type.![]()
I'm agree with you 100%charvista wrote: Wed Jan 14, 2026 8:53 pm When speaking about the error message, yes, that is more clear, but "Variable 'abc' already declared as type .q' is more precise...