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 resorceallocation

1768


Which command is used for writing text on a page?

571


Like OPTION EXPLICIT statement what are the other statements used in vbscript and their usage. Please post me all the statements please.

1612


Mention what is the difference between vbscript and vba?

506


Which in-built functions are used to convert the specified expression in the form of date and string in the vbscript language?

536






Which in-built function is used to format the number in the vbscript language?

571


Explain about vb script?

743


PLz send me the VB scripts which is having more examples my email id : hareen_11@yahoo.com

1658


How will you release the memory acquired by an array variable in vbscript?

738


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

572


What is the difference between a dictionary and an array?

571


HOw we can apply web service checkpoint in QTP 9.5? I tried it out with net connection also. But not getting success.

2057


Explain about .wsf files?

615


How should i Create Email invite with server-side Coding?

1595


Explain the asc function?

504