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



How to Pass Multiple values in functions by using vb script? Function value(arg1,arg2) N1=arg1..

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

How to Pass Multiple values in functions by using vb script? Function value(arg1,arg2) N1=arg1..

Answer / swati

above solution is a subroutine not a function

Is This Answer Correct ?    0 Yes 1 No

How to Pass Multiple values in functions by using vb script? Function value(arg1,arg2) N1=arg1..

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

Post New Answer

More VB Script Interview Questions

accept a string & display whether a is present or not

1 Answers  


Can automation testing find ssame no. of bugs what we can find by manual testing?

0 Answers  


i need to login to my yahoo accoutnt using VB Script, automating the operation of webobjects, even launching of IE. How?

1 Answers   Mphasis,


In html file what is an ideal position to include vbscript?

0 Answers  


There is a web Table where You will find Two Columns First Column consist of Check box and Second column consist of Test cases ID(Viz T1,T2,T3....Etc); If You select any Test case ID, respective Check boxes to be checked write a VBSCRIPT for this scenario?

1 Answers   eMids,






In the Web page we have a table link, if we click on that link all the contents under that link will be sorted (asscending/Descending). Now i want to check in which order the list is ? for that i need to get the data in to some var How can i get that cells data?

0 Answers   Nous,


Explain sga memory structures?

0 Answers  


Mention what if you do not specify anything when you call a procedure?

0 Answers  


How can I access an object in another frame?

1 Answers  


How can you create a file object to work with the files in the vbscript language?

0 Answers  


How will you get a random number between 0 and 1 in vbscript?

0 Answers  


Give examples where vb script can directly run on users system with windows as os?

1 Answers  


Categories