Awesome... it worked like a charm
 
Thanks

--- On Wed, 10/28/09, Prasad Dev <[email protected]> wrote:


From: Prasad Dev <[email protected]>
Subject: Re: return statement for functions
To: [email protected]
Date: Wednesday, October 28, 2009, 2:20 PM


Hi 

In VB Script there is no return keyword to return something from function.

Assign the value(which u want to return ) to the name of the function.

Eg.

Function Add_Val(a,b)
dim C
c=a+b
Add_Val=c
End function

To get the value use

Result=Add_Val(2,4)
msgbox Result


Regards,
Prasad


On Wed, Oct 28, 2009 at 7:13 PM, Kiran Ogeti <[email protected]> wrote:








Could anybody share the return statement for function.. probably with a sample 
function..
 
I had the fucntion written, but when put return.. it says type mismatch error..
 
Thanks








      
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to