Question with VBscript
How do I make it so a function in vbscript takes an object as a parameter?
-------------------------------NeXe: NeHe DirectX-style. Follow the orange rabbit.
August 21, 2000 09:14 PM
Remember, there is only one data type in VBScript: VARIANT.
'' no need to specify the TYPE of the parameter'' as it can only be a VARIANT, and the data'' the VARIANT encapsulates will be resolved'' at run time.. so watch runtime errors! <img src="smile.gif" width=15 height=15 align=middle>''sub sub1( object1, object2 ) object1.method object2.methodend sub'' function always returns VARIANT so'' no need to specify return typefunction func1( object1, object2 ) object1.method if object2.property == "Yes" then func1 = True else func1 = False end ifend function
HTH ..
if object2.property == "Yes" then
Been coding a little too much C++ recently? hehe...that should be a VBScript equals comparison operator (=), not C/C++ (==). I''m sure you know, but the devil''s in the details.
Epolevne
August 22, 2000 08:22 AM
quote:
Been coding a little too much C++ recently? hehe...that should be a VBScript equals comparison operator (=), not C/C++ (==). I''m sure you know, but the devil''s in the details.
doh! You got me!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement