Page 1 of 1
[Implemented] dynamic variable creation toogle
Posted: Thu Feb 19, 2004 1:29 pm
by Zaphod
i can't remember how often this created difficult locatable bugs. a mistyped variablename. i would much more prefer the compiler was shouting at me for beeing such a schmock to use an undecleared variable than to create a new one by accident.
(Implemented as 'EnableExplicit')
Posted: Thu Feb 19, 2004 3:12 pm
by Froggerprogger
Yes, that would be fine.
But I could think of an alternative to implement it inside the compiler:
A switch inside the editor (jaPBE or the official one), which (de)activates this functionality. Realized e.g. just by displaying undeclared variables in another color, e.g. red
Posted: Thu Feb 19, 2004 4:43 pm
by Kale
Posted: Thu Feb 19, 2004 5:00 pm
by Dare2
Actually Froggerprogger's suggestion is a good one!
In fact, so good I feel like typing it again:
Very Stern TypeCasting is on by default. (Yes!)
It can be turned off within the code.
And if turned off, un-typecast vars are highlighted in the editor.
Neat. Exit many WTF? errors - unless feeling masochistic and specifically asking for it.
* WTF = Why's This Failing? *
Posted: Thu Feb 19, 2004 5:16 pm
by Froggerprogger
Yes, it could be switched by:
Code: Select all
;TypeCastOn
.
.
;TypeCastOff
.
.
;TypeCastOn
So there would be no conflict.
could & would ...
