Hi,
In order to optimize a little bit, it's better to do:
correct_answers = 0
nb_answers = listname.count
repeat with x = 1 to nb_answers
if listname[x] = 1 then
correct_answers = (correct_answers + 1)
end if
end repeat
In the previous source code, Director evaluates "listname.count" for each
iteration of the loop.
------------------------------------------
Laurent BRIGAUT
Integration Nouveaux Media, Inc.
http://www.integration.qc.ca
------------------------------------------
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Leon McComish
> Sent: 23 octobre, 2000 07:35
> To: [EMAIL PROTECTED]
> Subject: RE: <lingo-l> help with list !
>
>
>
> correct_answers = 0
> repeat with x = 1 to listname.count
> if listname[x] = 1 then
> correct_answers = (correct_answers + 1)
> end if
> end repeat
>
> ..then do what you will with the result....
>
>
> Leon McComish
> Web Developer
> email: [EMAIL PROTECTED]
>
> Get the best free games on the web at
>
> www.freeloader.com
>
> freeloader.com is a division of
> Pure Entertainment Games PLC
> 131-151 Great Titchfield Street
> London W1P 8AE
> tel: +44 (0)207 663 3900
> fax: +44 (0)207 663 3901
>
>
>
>
>
> [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!]
>
[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!]