Probably a pointless question about using sort to search..

Alex Tweedly alex at tweedly.org
Fri Dec 11 18:51:37 EST 2015


I haven't read everything in this thread, so I don't know if Peter's 
function handled this or not ...


On 11/12/2015 23:32, Geoff Canyon wrote:
> On Thu, Dec 10, 2015 at 12:47 PM, Peter Brigham <pmbrig at gmail.com> wrote:
>
>> Someone on this list at some point posted an array sorting function that
>> might be relevant here for some applications. See below.
>>
> ​Why would anyone make a separate handler ​for this, and even more so, why
> make it a function that takes a value by reference and then hands a value
> back rather than a handler that changes the value in place?
>
> But back to the first point, this function can be eliminated in three lines
> of code:
>
> combine someArray using cr
> sort lines of someArray -- however you like
> split someArray by cr
>
Ummm ...
    put "abc" & CR & "def" into somearray[1]
    put "ghj" into somearray[2]
and then try the above 3-line code snippet.

-- Alex.




More information about the use-livecode mailing list