In VB scripting we notice two type function call syntex as per below
syntex1
Object.func1 parm1,param2
syntex2
Object.func2(param1,param2)
Now the question is what is difference between these two syntax.The answer is quite simple , it depends on the context . NO matter what the function is , if you are going to assign the return value to some variable or the result of the function call is used as input for some other function then the function should have the parameters in parenthesis.
example
msgbox "Hi"
msgbox trim(" Hi ")
syntex1
Object.func1 parm1,param2
syntex2
Object.func2(param1,param2)
Now the question is what is difference between these two syntax.The answer is quite simple , it depends on the context . NO matter what the function is , if you are going to assign the return value to some variable or the result of the function call is used as input for some other function then the function should have the parameters in parenthesis.
example
msgbox "Hi"
msgbox trim(" Hi ")
No comments:
Post a Comment