You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Variable 'nope' appears to never be assigned a value
One use of IsSet is to check for the presence of a class, function or other variable in a script which may or may not define it. For instance, a file may be used both standalone and as an #include.
In the former case, the variable is not defined. There is no warning from AutoHotkey, and getting a warning from the editor is distracting.
In the latter case, the main script can define a variable which affects the behaviour of the #include. An assignment cannot be included to suppress the warning, because the variable may be defined by a class or function. If the overall script defines a class or function, the interpreter would flag the assignment as an error.
For #Warn VarUnset, IsSet(nope) provides a way to suppress warnings about a specific global variable while still allowing the use case described above.
IsSet(nope) should not cause a warning even if the variable is not assigned. It should prevent other references to the variable from causing this warning.
The text was updated successfully, but these errors were encountered:
MsgBox IsSet(nope)
One use of IsSet is to check for the presence of a class, function or other variable in a script which may or may not define it. For instance, a file may be used both standalone and as an #include.
For
#Warn VarUnset
,IsSet(nope)
provides a way to suppress warnings about a specific global variable while still allowing the use case described above.IsSet(nope)
should not cause a warning even if the variable is not assigned. It should prevent other references to the variable from causing this warning.The text was updated successfully, but these errors were encountered: