Help me with my inability to see a simple solution

Nonsanity rev at nonsanity.com
Thu Dec 16 22:52:50 EST 2010


What the heck, I'll make one too. :)


function CheckList src
    sort items of src numeric

    put "," into dups
    put "," into miss

    repeat with a = 1 to item 1 of src - 1
        put a & "," after miss
    end repeat

    repeat with a = 1 to the number of items in src - 1
        if item a of src = item a+1 of src and ("," & item a of src & ",")
is not in dups
        then put item a of src & "," after dups

        if item a of src +1 < item a+1 of src and ("," & item a of src &
",") is not in miss
        then put item a of src + 1 & "," after miss
    end repeat

    return item 2 to -1 of miss & return & item 2 to -1 of dups
end CheckList


 ~ Chris Innanen
 ~ Nonsanity



More information about the Use-livecode mailing list