defining valid combinations

Victor t1msky at yahoo.co.uk
Thu Sep 4 19:09:58 UTC 2008


Hi Matt

Thanks a million for your extremely helpful responses.

I am pleased to report that the experiment is now complete and ready
to run!!

Regards

Tim


Matt Lenhart wrote:
> Hi Tim,
>
> The best way to approach the script for your experiment will depend on
> exactly what you plan on doing. For example, a dynamic array would be
> preferred if you are unsure of how many array slots will be needed
> throughout the experiment. The dynamic array will allow you to assign
> and re-assign slots throughout the experiment. A fixed array will be
> better if you only need to keep track of a specific number of values.
> So, in this experiment, if you only need to store the previous 5
> responses, a fixed array with 5 slots will be fine (e.g., in the same
> manner as a fixed array of 24 slots is fine for storing the possible
> responses).
>
> Once you have selected the appropriate type of array, you will need to
> create a global counter variable to keep track of which slot you are
> at in the array. For example, say you name this variable nCount. After
> each response from the subject, you will need to check to make sure
> the response is valid (i.e., by looping through the valid responses
> array), then check to make sure the response has not already been made
> (i.e., by looping through the distinct responses array), and then
> finally increment the counter and add the response to the distinct
> responses array if it meets the criterion:
>
> For nLoopCounter = 1 To UBound(arrValid)
>  'Check that we have a valid response...
> Next
>
> For nLoopCounter = 1 To UBound(arrDistinct)
>  'Check that we have a distinct response...
> Next
>
> 'If the response meets both criteria...
> If boolValid = True And boolDistinct = True Then
>  nCount = nCount + 1
>
>  arrDistinct(nCount) = Stimulus.RESP
> End If
>
> Keep in mind that the only script within each loop is just comparing
> the current response to each slot. If a match is found in the first
> case, then boolValid would be set to True. If a match is found in the
> second loop, then boolDistinct is set to false.
>
> If any of this is not clear or you run into any further difficulty
> with this task, I would recommend making a support request at:
> http://www.pstnet.com/e-prime/support/  While I do try to respond here
> as often as possible, only requests made at the link provided are
> guaranteed to receive a timely response from PST representative. If
> you choose to respond here, I will try to reply as quickly as
> possible, but I cannot assure you of that as official support requests
> are handled first.
>
> - Matt
> PST Technical Consultant
> http://www.pstnet.com/
>
>
> On Aug 29, 6:15�am, Victor <t1m... at yahoo.co.uk> wrote:
> > Hi David
> >
> > I have been using the E-basic Help. �The problem that I have is not
> > fully understanding VB. I have gotten away with bootstrapping until
> > now by using other sample experiments. �With the current problem, I
> > can not find an example, nor am I sure if what I am writing is
> > affecting the program in the way I intend, so I could be cose to a
> > solution but I am probably more likely to be a million miles away.
> >
> > David McFarlane wrote:
> > > Tim,
> >
> > > >I have referred to the help section of E-studio but to no avail.
> >
> > > Just a general comment, that is the wrong help section if you want
> > > help with E-Basic constructs. �For that you want to go to the E-Basic
> > > Help, i.e., Help > E-Basic Help �(*not* Help Topics).
> >
> > > -- 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