4nt1h4cker Posted September 2, 2008 Posted September 2, 2008 (edited) Hi @ all, some array Funtions took from php. Written by me. _ArrayCall _ArrayDiff _ArraySum _ArraySortWith _ArraySplice _ArraySlice _ArrayRand _ArrayShufflemyarrayfuncs.au3 Edited September 2, 2008 by 4nt1h4cker
therks Posted September 2, 2008 Posted September 2, 2008 Looks good, I'll have to try these out later. I have one question though, your Array shuffle seems kind of complicated, I wrote one myself a while ago that was rather simple, and I'm just wondering if there's any real difference between the two. Here's mine: Func _ArrayShuffle(ByRef $aArray, $iBase = 0, $iUBound = Default) If Not IsArray($aArray) Then Return SetError(1, 0, 0) If UBound($aArray, 0) <> 1 Then Return SetError(2, 0, 0) Local $temp, $rand If $iUBound = Default Or $iUBound = 0 Then $iUBound = UBound($aArray) - 1 For $i = $iBase To $iUBound $temp = $aArray[$i] $rand = Random($iBase, $iUBound, 1) $aArray[$i] = $aArray[$rand] $aArray[$rand] = $temp Next EndFunc Okay, time for bed (5:30am)! My AutoIt Stuff | My Github
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now