|
There is one minor gotcha to be aware of.
Supposing you have a script which can take an optional parameter on the command line. In this case, you cannot set "Explicit" on.
The problem is that if the variable is not defined on the command line (it is optional after all) then you cannot reference it at all. You cannot check to see if it is undefined, as the first time that you attempt to reference it you will get an error.
You cannot DIM the variable in the script, as that will destroy the value passed on the command line.
This means that you must always pass the variable on the command line, even if you set it to "" (which is of course a number, heh).
As I say it is a minor one, and you can always take the view that a script with "Explicit" on cannot by definition have an optional parameter.
|