At 3:09 PM -0300 6/30/05, Rods wrote:
How is the best way to count the occurrences of values in a list? I
have a list with 6000+ random generated numbers and I need to count
how many times each of one appear.
I'd try something like:
occurrences = [:]
repeat with val in alist
occurrences.setaprop(val, occurrences.getaprop(val) + 1)
end repeat
--
Cole
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[email protected] (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]