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 / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the features of visual basic?

1727


Which operator is used to perform the comparison among 2 operands in the vbscript language?

694


Which command is used for writing text on a page?

735


How to open a file. What is the perpose of true and false mode there?

809


What are the uses of vb script?

770


How to create a function in vbscript?

785


How will you convert a given number to long in vbscript?

651


How to identify column in VSFlexgrid? My VSFlexgrid window is identified as 'Active X Control'

3492


What are the environments supported by vbscript language?

677


How to assign a date value to a variable?

753


What is the use of the instr function?

760


Hello friends..... Can any give the methods for Ms-Access, and Mozilla firefox in Automation Object Model in QTP. Please give me currect answers... if you do not understand my question please don't give answers. Thanking you.

2068


i wrote vbscripit code in notepad i got error i am in learning stage if u ps tell me what wrong in my code my error is "object required descriptive at line one run time error"and my code is "set usernameobj=Descriptive.Create() usernameobj( "name").value="Username" set passwordobj=Descriptive.Create() passwordobj("name").value="password" set signinobj=Descriptive.Create() signinobj("name").value="sigin" browser("gmail").page("gmail").WebEdit("usernameobj").set ("enter username") Browser("gmail").Page("gmail").WebEdit("passwordobj").Set secure.Crypt.Encrypt("enter password") browser("gmail").page("gmail").WebButton("siginobj").click

1612


Explain about the support of asp for vb script functionality?

705


What are the advantages of vbscript?

818