is among - problem

Mark Powell Mark.Powell at
Fri Nov 21 14:37:07 EST 2003

Since you are dealing specifically with three digits, how about using min,
max, median functions instead of "is among":

on mouseup
  put fld "myList" into RawNumberList
  repeat with x = 1 to number of lines in RawNumberList
    put line x of RawNumberList into theLine
    put char 1 of theLine & comma & char 2 of theLine & comma & char 3 of
theLine into theLine
    put min(theLine) & median(theLine) & max(theLine) into line x of
  end repeat
  repeat with y = number of lines in RawNumberListCompare down to 2
    if line y of RawNumberListCompare is in (line 1 to (y-1) of
RawNumberListCompare) then delete line y of RawNumberList
  end repeat
  put RawNumberList into fld "myList"
end mouseup

-----Original Message-----
From: use-revolution-bounces at
[mailto:use-revolution-bounces at]
Sent: Friday, November 21, 2003 7:48 AM
To: How to use Revolution
Subject: is among - problem

Hello to all of you wonderful REV developers..  :-)

I have a problem where I have a field filled with 3 single digit 
numbers per line (210 lines). I wanted to find and delete any lines 
that had ALL of the same numbers in it but in any order - so 123 and 
213 and 321 and 312 would be duplicates and I would delete all but the 
first one...


Advanced Media Group
Thomas J McGrath III 	 ð 2003 ð	3mcgrath at
220 Drake Road, Bethel Park, PA 15102

More information about the Use-livecode mailing list