VBScript Class - 10 by S P SHARMA CLASSES (7048972696)
<html>
<body>
<script type="text/VBScript">
dim x
x="Ram"
document.write("x=" & x & "<br/>")
dim y
'y='R'
y=8.5
document.write("y=" & y & "<br/>")
a=#2021/01/24#
document.write("a=" & a & "<br/>")
a=#01/24/2021#
document.write("a=" & a & "<br/>")
a=#20:18#
document.write("a=" & a & "<br/>")
a=#08:19:20 PM#
document.write("a=" & a & "<br/>")
document.write("........................<br/><br/>")
dim B(3)
B(0)="Ram"
B(1)="Raj"
B(2)="Sam"
B(3)="John"
for i =0 to 3
document.write(B(i) & "<br/>")
next
document.write("........................<br/><br/>")
for each i in B
document.write(i & "<br/>")
next
document.write("........................<br/><br/>")
Dim Emp
Emp=Array("Amit",25,#01/24/1990#)
for each i in Emp
document.write(i & "<br/>")
next
document.write("........................<br/><br/>")
public C(2,3)
C(0,0)=0
C(0,1)=1
C(0,2)=2
C(0,3)=3
C(1,0)=4
C(1,1)=5
C(1,2)=6
C(1,3)=7
C(2,0)=8
C(2,1)=9
C(2,2)=1
C(2,3)=2
for i=0 to 2
for j=0 to 3
document.write(C(i,j) & " ")
next
document.write("<br/>")
next
document.write("Dynamic Array........................<br/><br/>")
private D()
Redim D(2)
D(0)="Ram"
D(1)=25
D(2)=25000
for each i in D
document.write(i & "<br/>")
next
document.write("Dynamic Array........................<br/><br/>")
redim preserve D(4)
D(3)="Delhi"
D(4)="IT"
for each i in D
document.write(i & "<br/>")
next
document.write("Dynamic Array........................<br/><br/>")
redim D(6)
D(5)=#01/05/1995#
D(6)="Dr. Mukherjee Nagar"
for i=0 To 6
document.write(i+1 & " Element= " & D(i) & "<br/>")
next
</script>
</body>
</html>
No comments:
Post a Comment