Reset accuracy and/or trial count

David McFarlane mcfarla9 at msu.edu
Mon Jul 13 19:44:16 UTC 2009


Katherine,

Not bad, you have proper global variables, you use a Summation 
object, etc.  Let's see what we can find...

>         Else
>                 'No error trials to run
>                 GoTo EndOfBlock
>                 Accuracy.Reset
>         End If

OK, your script never gets to the "Accuracy.Reset" line.  As soon as 
it reaches the Else condition (i.e., completes the block with 
accuracy < .60), it goes to the EndOfBlock label and skips right past 
the Accuracy.Reset!  Also, you do not have any line to reset the 
TrialCount.  Try the following:

         Else
                 'No error trials to run
                 Accuracy.Reset
                 TrialCount = 0
                 GoTo EndOfBlock
         End If


Further comments:

1) Since your TrialCount is always the same as the number of Accuracy 
observations, you can get rid of the TrialCount variable and just use 
Accuracy.N in its place (please see the Summation Object topic in the 
online E-Basic Help).

2) I do not see where you use the variable CriterionMet.  Either that 
variable gets used somewhere else, or it does not get used at all, in 
which case you ought to delete it in order to avoid 
confusion.  Chances are it's just an abandoned variable from an 
earlier draft of the program.

3) I would rather not bury my variable initializations in an If-Then 
script at the end of a procedure.  Instead, I would use a separate 
BlockInitScript at the start of the block and do all my 
initializations there.  That way the initializations always get done 
before each block no matter how the program progresses.

4) If PracticeTrialProc1, PracticeTrialProc2, and PracticeTrialProc3 
do essentially the same thing, then I would use just one procedure 
(PracticeTrialProc) and do it three times in order to simplify the 
entire program.

Good luck,
-- David McFarlane, Professional Faultfinder


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en
-~----------~----~----~----~------~----~------~--~---



More information about the Eprime mailing list