use-revolution digest, Vol 1 #459 - 11 msgs
David Vaughan
drvaughan55 at mac.com
Mon Jun 10 18:14:01 EDT 2002
John
The suggestion Yves made is very elegant, provided we are interpreting
your request correctly and you fully understand what [I presume] he
intends.
I assume you have an input file comprising question numbers, and comma
or tab and "true", "false" and "unanswered" statements. In this case you
simply read in the file (get URL) to a variable and loop through it as
follows:
(optionally set itemDelimiter to tab)
repeat for each item Ans in AnswerList
add 1 to Scoring[item 2 of Ans]
end repeat.
The scores are then available in Scoring["true"], Scoring["false"], and
Scoring["Unanswered"].
if unanswered questions are simply empty of a response then you will
need to test for that, in which case a switch...case statement which
increments three variables might be faster than the array (since you are
doing the testing anyway)
600 questions is not much work for Rev. These approaches will process
such a list in less than a tenth of a second.
Let us know if your requirement is actually different or anything is not
clear.
regards
David
On Tuesday, June 11, 2002, at 04:52 , Yves Coppé wrote:
>> Greetings All,
>>
>> I am working on an app to score a test. It is long; nearly 600 items,
>> all True/False/Unanswered. It will be scored on a number of scales.
>> Any suggestions for structuring this data efficiently?
>>
>> Sincerely,
>>
>>
>> John R. Brauer, Psy.D.
>> Clinical Psychologist
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
>
> an array should do the work.
> -- Greetings.
>
> Yves COPPE
>
> Email : yvescoppe at skynet.be
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list