VBScript Class - 9 by S P SHARMA CLASSES (7048972696)
<html>
<body>
<script type="text/VBScript">
document.write("Call byRef.............<br/><br/>")
function show(x)
x=x+3
show=x
end function
dim x
x=5
document.write("Before calling x=" & x & "<br/>")
call show(x)
document.write("After calling x=" & x & "<br/>")
document.write("Call byVal.............<br/><br/>")
function change(byVal y)
y=y+3
change=y
document.write("Inside change y=" & y & "<br/>")
end function
dim y
y=5
document.write("Before calling y=" & y & "<br/>")
call change(y)
document.write("After calling y=" & y & "<br/>")
document.write("Call byRef.............<br/><br/>")
function show1(byRef x1)
x1=x1+3
show1=x1
end function
dim x1
x1=5
document.write("Before calling x1=" & x1 & "<br/>")
call show1(x1)
document.write("After calling x1=" & x1 & "<br/>")
</script>
</body>
</html>
No comments:
Post a Comment