Quality Testing

Quality is delighting customers

Hi,

 

Please anyone can explain "Call by Value and Call by Reference" with VBScript code

 

Thanks in advance..

 

Regards,

Raja

Views: 455

Reply to This

Replies to This Discussion

Hi Raja,

 

call by val: If the value is chaged in the function the parameter value is not changed

call by ref: If the value is changed in the function the parameter value is also changed

Ex;

 

dim a,b

a=10

b-20

 

function f1(byval x, byref y)

x=100

y=200

 

End Function

 

Call f1(a,b)

 

msgbox a&" "&b

 

output is a=10

               b=200

Hi Vijay,

 

Thank you for valuable explanation :)

 

Regards,

Raja

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2020   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service