WScript.echo "-------------------------------------------------------"
WScript.echo "Playing with array"
wscript.echo "-------------------------------------------------------"
Dim arrArray
Dim i
Dim sTmp
arrArray = Array(81,117,105,99,107,84,101,115,116,45,80,114,111)
'--- Checking if variable is an array.
If IsArray(arrArray) Then
For i = LBound(arrArray) To UBound(arrArray)
WScript.Echo (arrArray(i))
arrArray(i) = Chr(arrArray(i))
WScript.Echo (arrArray(i))
Next
End If
If IsArray(arrArray) Then
sTmp = Join(arrArray, vbNullString)
MsgBox sTmp
MsgBox vbNullString
MsgBox vbNull
End If
Erase arrArray
MsgBox vbArray
MsgBox vbByte
WScript.echo "-------------------------------------------------------"
WScript.echo "Split to make array n filtering"
wscript.echo "-------------------------------------------------------"
a=Split("Sunday Monday Tuesday WEDNES DAY T h urs dayF r iday Satu r day"," ",-1,1)
a=Split("Sunday Monday Tuesday WEDNES DAY T h urs dayF r iday Satu r day")
for each x in a
WScript.Echo(x)
Next
WScript.Echo
WScript.Echo "Filter Function"
WScript.Echo
WScript.Echo
WScript.Echo "True Function"
WScript.Echo
a=Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
b=Filter(a,"S",True,1)
for each x in b
WScript.Echo (x)
Next
WScript.Echo
WScript.Echo "True Function"
WScript.Echo
a=Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
b=Filter(a,"S",True,0)
for each x in b
WScript.Echo (x)
next
WScript.Echo "True Function"
a=Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
b=Filter(a,"S",True)
for each x in b
WScript.Echo (x)
next
WScript.Echo
WScript.Echo "False"
WScript.Echo
a=Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
b=Filter(a,"S",False,1)
for each x in b
WScript.Echo (x)
next
WScript.Echo
WScript.Echo "False"
WScript.Echo
a=Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
b=Filter(a,"S",False,0)
for each x in b
WScript.Echo (x)
next
No comments:
Post a Comment