Not to hammer this home any futher, but the following clearly demonstrates this behavior:

Code:

Break On

$= SetOption("Explicit", "On")

?"value=" $somevariable

Exit 0



We first set Explicit ON, which means this:

Quote:


When you enable the Explicit option, you must explicitly declare all variables using Dim, Global or ReDim statements. If you attempt to use an undeclared variable name, an error occurs. Use the Explicit option to avoid incorrectly typing the name of an existing variable.





Then if you run the script like this:

C:\> kix32 test.kix

You get this:

ERROR : undefined variable [somevariable]!
Script: E:\t.KIX
Line : 7

But then if you run the same script like this:

C:\> kix32 test.kix $somevariable=1

You get no syntax error. $somevariable passes the test as being declared (Global in this case).

-Shawn