Global $VarName
vs
Dim $VarName

Undeclared vars default to globals and will get you into trouble. ALWAYS declare your vars via GLOBAL or DIM commands.

Use of $=SetOption('Explicit', 'On') will prevent the script from running with undeclared vars. There are several SetOption settings that will enforce good coding habits, including NoVarsInStrings and NoMacrosInStrings. WrapAtEOF is also recommended for console scripts.

Use of KGen (or at least the Sanity() UDF) will report all undeclared vars.

KGen is part of the Kix-Dev package on my web site, and includes the Sanity feature. It's a UDF resolver (kind of like a linker).

Glenn
_________________________
Actually I am a Rocket Scientist! \:D