feedback object - correct answer one of many

Matt Lenhart matt.lenhart at gmail.com
Mon Oct 29 18:56:37 UTC 2007


Hi Caren,

Sorry, I meant to mention this in my last response, but you can get a
lot more information on declaring arrays and the syntax necessary in
the E-Basic Online Help. You can get to this via the Help menu in E-
Studio. Then, do a search for the Array topic.

In general, you would want to declare this array globally, so that it
retains all of these values throughout the experiment, and from any
level (i.e. you want to be able to view its contents at the Session,
Block, Trial, etc levels). To declare it globally, open the Script
window from the View menu and then click the User tab. Here, you can
enter variable declarations for global variables. This is where you
would place:

Dim arrCorrect(40) As String

Then, you would place an InLine at the start of the experiment to
"fill" the array with the necessary values. This will need to be done
manually, but there are ways to use a loop to do this. For example,
you could create a List object in the Unreferenced E-Objects folder in
your experiment, create an attribute named "CorrectResponse", and then
enter all of the possible correct answers in this List under this
attribute. Then, in the InLine at the start of the experiment, you can
use a loop to load the array via this List. For example, say the List
is named AnswerList:

Dim nCount As Integer

For nCount = 1 To 40
 arrCorrect(nCount) = AnswerList.GetAttrib(nCount, "CorrectResponse")
Next

This will load the array automatically, and you won't need to create
40 separate lines of script. This also makes editing the correct
responses easier, since you can just change the values in the List.


- Matt
PST Technical Consultant
http://www.pstnet.com


--~--~---------~--~----~------------~-------~--~----~
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