Code: Select all
MyGui := Gui.New()
MyGui.GetPos( X, Y, Width, Height )
/*
Warning: This variable appears to never be assigned a value.
Specifically: global X
Line#
001: MyGui := Gui.New()
---> 002: MyGui.GetPos( X, Y, Width, Height )
Code: Select all
MyGui := Gui.New()
MyGui.GetPos( X, Y, Width, Height )
/*
Warning: This variable appears to never be assigned a value.
Specifically: global X
Line#
001: MyGui := Gui.New()
---> 002: MyGui.GetPos( X, Y, Width, Height )
Code: Select all
; X := "", Y := "", Width := "", Height := ""
X := Y := Width := Height := ""
MyGui := Gui.New()
MyGui.GetPos( X, Y, Width, Height )
a112 wrote:Enabled #Warn UseUnset by default - to be converted to a continuable error at some point.
Thanks - missed that.swagfag wrote: ↑20 Jul 2020, 16:31@aseiot wrote about this earlier https://www.autohotkey.com/boards/viewtopic.php?p=342939#p342939
Changed #Warn UseUnset to also warn at load time if possible.
- Flags the first reference to each variable which is not used in a direct non-dynamic assignment or as an output var/ByRef parameter of a non-dynamic function call.
You are not understanding the thread correctly. aseiot posted a bunch of different issues, some related, some unrelated. I specifically noted which issues were fixed, and this was not one of them. (I didn't specifically say this isn't a bug, but I implied it.)SAbboushi wrote:If I'm understanding the thread correctly, lexikos believed [a118] "fixed" that.
I haven't updated the #Warn UseUnset documentation yet - it is only the documented part that will be replaced with a runtime error. That is, there will be a runtime error when you attempt to access an uninitialized variable. The load time warnings will take the place of #Warn UseUnset, and will be optional. They might become positional or scoped, so you can disable the warning for a specific section of code.swagfag wrote:disable the warnings - pointless, merely delaying, since theyll be baked in eventually
You can avoid it by initializing the variable before passing it ByRef
Users browsing this forum: StuBerg and 17 guests