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

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

805


Which keyword is used to declare a variable in the vbscript language?

529


when we use filter funtiom invb script(QTP)

2299


How to replace junk code recorded by QTP with a mall function.

1646


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

488






What is the difference between function and procedure?

567


Explain the .wsf files?

529


What is the difference between javascript and vbscript?

532


what is event handling?

580


who will create the object?

1719


How to create a function in vbscript?

582


How can constants be declared in the vbscript language?

550


How to write VB script for login module?

2673


Description.Create

2160


Explain the operator precedence in vb script?

648