Help me with my inability to see a simple solution

william humphrey bill at bluewatermaritime.com
Thu Dec 16 19:59:51 EST 2010


Thanks Alex - tested working also.

On Thu, Dec 16, 2010 at 8:48 PM, Alex Tweedly <alex at tweedly.net> wrote:

> function other pMin, pMax, pList
>>
>>    put empty into tMissingList
>>    put empty into tDuplicateList
>>
>>    -- sort the data if needed
>>    -- sort items of pList ascending numeric
>>
>>    put pMin-1 into tLast
>>    repeat for each item N in pList
>>        if N = tLast+1 then
>>            put N into tLast
>>            next repeat
>>        end if
>>        if N = tLast then
>>            put N & comma after tDuplicateList
>>            next repeat
>>        end if
>>        repeat with i = tLast+1 to N-1
>>
>>            put i & comma after tMissingList
>>        end repeat
>>        put N into tLast
>>
>>    end repeat
>>    return (char 1 to -2 of tMIssingList) &cr& \
>>            (char 1 to -2 of tDuplicateList)
>> end other
>
>


-- 
http://www.bluewatermaritime.com



More information about the use-livecode mailing list