Just another update

This commit is contained in:
Ingy döt Net 2015-02-20 00:35:01 -05:00
parent a25938f123
commit 00a190b0a6
6591 changed files with 94363 additions and 23227 deletions

View file

@ -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