Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
|
|
@ -1 +1,15 @@
|
|||
1!2!3!4!5!6!7!8
|
||||
' Flatten the example array...
|
||||
a = FlattenArray(Array(Array(1), 2, Array(Array(3,4), 5), Array(Array(Array())), Array(Array(Array(6))), 7, 8, Array()))
|
||||
|
||||
' Print the list, comma-separated...
|
||||
WScript.Echo Join(a, ",")
|
||||
|
||||
Function FlattenArray(a)
|
||||
If IsArray(a) Then DoFlatten a, FlattenArray: FlattenArray = Split(Trim(FlattenArray))
|
||||
End Function
|
||||
|
||||
Sub DoFlatten(a, s)
|
||||
For i = 0 To UBound(a)
|
||||
If IsArray(a(i)) Then DoFlatten a(i), s Else s = s & a(i) & " "
|
||||
Next
|
||||
End Sub
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue