Thanks Terry. This solved my problem!

On Thu, Dec 16, 2010 at 8:03 PM, Terry Judd <t...@unimelb.edu.au> wrote:

> pMin is your minimum value
> pMax is your maximum value
> pList is your list of numbers to test
> The output is a list of missing numbers (line 1) and repeat numbers (line
> 2)
>
> function stuff pMin, pMax, pList
>   put empty into tMissingList
>   put empty into tDuplicateList
>   repeat with i = pMin to pMax
>      put true into tMissing
>      put empty into tDuplicate
>      repeat for each item tValue in pList
>         if tValue = i then
>            put false into tMissing
>            put i & comma after tDuplicate
>         end if
>      end repeat
>      if tMissing then
>         put i & comma after tMissingList
>      end if
>      if the number of items in tDuplicate > 1 then
>         put i & comma after tDuplicateList
>      end if
>   end repeat
>   return (char 1 to -2 of tMIssingList) &cr& \
>   (char 1 to -2 of tDuplicateList)
> end stuff
>



-- 
http://www.bluewatermaritime.com
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to