jaberwacky Posted October 8, 2009 Posted October 8, 2009 #Include <Array.au3> Local $Array[ 3 ] = [1,2,3] _ArrayToString(_ArraySort($Array)) C:\Documents and Settings\Administrator\Desktop\afrarg.au3(5,34) : ERROR: _ArrayToString() called with exp<b></b>ression on Const ByRef-param(s). _ArrayToString(_ArraySort($Array)) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Program Files\AutoIt3\Include\Array.au3(1243,81) : REF: definition of _ArrayToString(). Func _ArrayToString(Const ByRef $avArray, $sDelim = "|", $iStart = 0, $iEnd = 0) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum?
Valuater Posted October 8, 2009 Posted October 8, 2009 On success, _ArraySort() returns 1. Basically you are stating ArrayToString(1) Maybe... #include <Array.au3> Local $Array[4] = [1, 4, 2, 3] _ArraySort($Array) $string = _ArrayToString($Array, ",") MsgBox(4096, "String", $string) 8)
jaberwacky Posted October 8, 2009 Author Posted October 8, 2009 (edited) On success, _ArraySort() returns 1. Basically you are stating ArrayToString(1) Maybe... #include <Array.au3> Local $Array[4] = [1, 4, 2, 3] _ArraySort($Array) $string = _ArrayToString($Array, ",") MsgBox(4096, "String", $string) 8) Oh DUH! Thanks Valuator... Any reason why it returns a 1 and not a sorted array? Oh because the array is passed ByRef and therefore it sorts the array in place? Edited October 8, 2009 by jaberwocky6669 Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum?
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