Reporting the number of duplicates in a list of numbers?
johnpatten at me.com
Sun May 4 22:58:09 EDT 2014
I am attempting to get the total number of times specific words in a text passage are selected by students. The way I’m doing this is by recording the word numbers selected by each student and storing them in a database. I end up with list of numbers representing the selected words, something like this:
… etc. etc. I would like to determine the number of times the same words are selected by the students and then control their font size, make the font size larger the more often the text is selected. So the teacher’s report would be the same passage of text with the font sizes of the text increased based on how many times the word was selected by the students.
I’m not sure how to get the counts for the selected words. These list of word numbers could be quite long, depending on how many students are in the class and the length of the passage. I have not done anything like this before so I’m looking for any advice. Should I be dumping the list into an array and then working some kind of array magic? Can I just use a repeated find script and increment a variable for each item in my list?
I didn’t want to spin my wheels too long, and this is probably pretty basic, but I can’t remember coding a solution to something like this in the past.
More information about the Use-livecode