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 |
What is vbscript procedures?
How will you get a random number between 0 and 1 in vbscript?
Explain about .wsf files?
What are the valid scopes of a variable in vbscript?
Here in my automation tool, i am retreiving some values and i need to store this values in the excel. How can i achieve this?. We are using VBA as scripting language. please let me know if you require any further inputs.
Could Anybody tell me the Script for REVERSE an Interger int reverse(int num) Ex:246 to 642.. Thanks in Advance.
Diff between web table ,datatable and data base (QTP)
how to set one column as primary key in QTP and fetch values accordingly
What are the properties of regexp object?
Why to use option explicit in vb script?
how to answer "TELL ME ABOUT UR SELF" as exp.person. whr to start and whr to stop. can anyone tel me
How to get the background color of a weblist?