How to Pass Multiple values in functions by using vb script?
Function value(arg1,arg2)
N1=arg1+arg2
N2=arg1-agr2
N3=arg1*agr2
N4=arg1/arg2
Value= How to pass ?
End Function
Answers were Sorted based on User's Feedback
Answer / lak
Function value(arg1,arg2,N)
N1=arg1+arg2
N2=arg1-arg2
N3=arg1*arg2
N4=arg1/arg2
Value= N
End Function
call value(10,10,N1)
msgbox N1
call value(10,10,N2)
msgbox N2
call value(10,10,N3)
msgbox N3
call value(10,10,N4)
msgbox N4
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / sureshkumar
Function value(a1,a2, res)
res=a1+a2
res=a1-a2
return res
End Function
call value(10,10,res)
print res[0]
print res[1]
| Is This Answer Correct ? | 2 Yes | 5 No |
Whenever I use Wscript.Echo Qtp raising Run time error as 'Object required for Wscript' How I can create object for Wscript
I have a webtable and many objects are embedded in side.(like buttons,checkboxes etc). How to know how many such objects are there? what is the class of that objects?
Why is it recommended to close the database connection every time after the work is completed?
What is the purpose of drive object of scripting.filesystemobject class in vbscript?
how to write code: to check whether the window of an Application Under Test exist or not . plz give with example
Which in-built functions are used to convert the specified expression in the form of date and string in the vbscript language?
what is used of Property........End Property loop ? how to write the script for it?
If anyone knows abt Test Complete material, Pls let me Know. if u have any material or any documents..... Pls mail me on this mail Id...... This is very Urgent Requirment..... for my Project.....
write a program to display configuration of a local system with the help of vb script.
write a vb script to display first 5 odd numbers from 1 to 100
how to store charecters of HARIBABU Using arrays
How to get 120 using 5 zeroes, you can use any operator(+, *, /...) in qtp.