Nothing
and Optional Parameters JScriptNORMAL LEGAL DISCLAIMERS APPLY TO THIS SOFTWARE. DON'T TRY TO RUN NUCLEAR POWER PLANTS, LIFE-SUPPORT SYSTEMS, OR YOUR TOASTER WITH IT.
This component allows you to pass Nothing
(aka NULL, aka an
invalid reference to an ActiveX Object) as a parameter to other ActiveX
objects in JScript. It also allows you to skip 'optional' arguments
in function calls (methods).
The source code is freely available from me, Peter Torr. (If that address fails, try this one, but the first address will get a much quicker response).. It should be available on the web, hanging off the directory http://www.netspace.net.au/~torrboy/code/. The general sort of free-source rules apply - you can do what you want with this code, as long as:
This component is a standard ActiveX DLL, built with Microsoft's ActiveX Template Library (ATL) and Visual C++ 5. It has been marked as "Safe for scripting", but has not been signed.
Nothing
. You can't do anything useful with the
return value, except pass it to other methods that can handle
references to Nothing
.See the sample file "test.js" to see how to use this component.