How can we return a value from User Defined Function ?
For Eg. we have 2 functions. In Fun1 i am getting 2 values
(a,b) and i am addding those 2 and storing in to another var
(c). Now i want to pass that var(c) to another function
(fun2). What will be the script?
Answer Posted / siri
'vbscript
dim a:a=20
dim b:b=30
dim d
d=add(a,b)
call subtract(d)
function add(a,b)
dim c
c=a+b
add=c
end function
function subtract(d)
dim f:f=10
dim e
e=d-f
msgbox e
end function
| Is This Answer Correct ? | 6 Yes | 3 No |
Post New Answer View All Answers
Explain about arrays in vb script?
When are redim statement and preserve keyword used in the vbscript language?
how does vb script help in web page designing? explain with example.
Explain the filter expression?
How do i automate a website www.flyashx.com without having any test cases witin a week time.
Which operator can be used to check if two numbers are equal or not in vbscript?
How to open excel in vb script?
How to capture a runtime error in vbscript?
does anyone have qtp11.0 license key.Please sendit to my mail id-rrvv2011@gmail.com...Thanks
What is the purpose of drive object of scripting.filesystemobject class in vbscript?
What is the difference between VBScript and JavaScript?
How can the spaces from the string be removed?
Hello Friends , I am the new joinner of this website. I am working with Sapient ,Gurgoan I would like to ask few qurries regarding the QTP Tool of (Testing) Currently working on QTP Tool . I would like to no learn VB Script can u name some Books which i get in market. And a small issue in QTP I had 2 users right i have to login and send the document from this user to second user right. when i am send this doc some contendId number generates right. now i am loging into second user and i have to search for that contentId right i found it now i dont want to accept the document so i had an opption of check out ok i have to click on check out my QTP Code is like this Browser(" ").Page(" ").WebTable(" ").ChildItem (3,5,"Image",0).click Browser(" ").Page(" ").Link("ChecK Out").Click i new this code is perfectly right but when i am run the script i have to click on that particular contentId and click on check out but now the Problem is started the error is the document has been already checked out remeber every time my content id changes means it is the new contentId which is not been used atleast once Please help me out in this issue i am in big trouble
How many types of operators are available in the vbscript language?
What is loose binding? Why is it not a good practice to use it?