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 |
How to identify column in VSFlexgrid? My VSFlexgrid window is identified as 'Active X Control'
How to write VB Script for selecting a particular row in a WebTable?
How you can call vbscript functions?
How to pass argument by reference to a function in vbscript?
how to find the textfile in the folder and copy file from one folder to another folder useing parameterigation in QTP
How to Import data from a file (file is on the desktop) to the data table
what is descriptive programming in QTP and what is environment variable in QTP? where we store and what is its use?
What aspects of vbscript make it safe so that a web page using vbscript cannot destroy or corrupt information on a user's computer?
What is dictionary object in vbscript? Explain?
When are redim statement and preserve keyword used in the vbscript language?
i have to open a notepad having no. of words in dat file by recording in qtp and then find a particular word and display true or false
what is diff between static and dynaic arrys?