Another approach:

on countItems listIn
  tempList = duplicate(listIn)
  counterList = [:]
  
  repeat while templIst.count > 0
    myItem = templIst[1]
    repeat while templist.getPos(myItem) <> 0
      templist.deleteAt(templIst.getPos(myItem))
      if voidP(counterList.getAprop(myItem)) then
        counterList.addProp(myItem, 1)
      else
        counterList[myItem] = counterList[myItem] + 1
      end if
    end repeat
  end repeat
  return counterList
end


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/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!]

Reply via email to