Razier

The Lunatic Coder


The Vision of Escaflowne: Hitomi

The Vision of Escaflowne: Hitomi - http://gallery.razier.com/30042011Hitomi/

Shuffle Array via Lotuscript


%REM
Function arrayShuffle
Description: Lotuscript Shuffle Array Function
%END REM
Function arrayShuffle(arrayData As Variant) As Variant

Dim y As Integer
Dim randomPos As Integer
Dim tmp As Variant

For y = 0 To UBound(arrayData)
randomPos = Round(Rnd() * UBound(arrayData),0)
tmp = arrayData(y)

arrayData(y) = arrayData(randomPos)
arrayData(randomPos) = tmp
Next

arrayShuffle = arrayData
End Function

Older Posts »

Search

Gallery


You are on razier.com with extra herbs, spice and few things that are not so nice.
Unless stated, all of the stuff here belongs to Raz. Enjoy your stay.