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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of on error resume next statement?

579


Give me sm ideas to write Vbscripts abt protocol testing abilash700@gmail.com.

1590


What are class variables?

620


How will you get a subset of a array in vbscript?

590


how to comvert 120 into one hunderd twenty rupees only and vice varsa

1807






How are values assigned to the variables in the vbscript language?

579


how to operate webobjects in a webpage using getobject function and then using generic methods?

2545


What are the 2 ways in which a variable can be declared in the vbscript language?

568


What is the difference between javascript and vbscript?

536


What are the different types of loops available in the vbscript language?

536


What is the difference between vbscript and vba?

605


Program to use input box and send even numbers into sheet1 and odd numbers into sheet2 and prime numbers into sheet3 using vbscript(QTP)?

2593


Explain what is loose binding? Why is it not a good practice to use it?

583


how to set one column as primary key in QTP and fetch values accordingly

1826


How to declare an array in vbscript?

670