User`s guide
E-Prime User’s Guide
Chapter 4: Using E-Basic
Page 161
'If the subject enters "1" run Procedure 1, otherwise run
'Procedure 2.
If subject.RESP = "1" Then
List1.Run
Else
List2.Run
End If
4.7.4.2 Arrays
Creating a single dimension array, assigning values, and accessing values
for display.
'Creating and assigning values to a single dimension array
Dim WordList(4) As String
Dim i As Integer
WordList(0) = "Every"
WordList(1) = "good"
WordList(2) = "boy"
WordList(3) = "does"
WordList(4) = "fine"
For i = 0 To 4
MsgBox WordList(i)
Next i
4.7.4.3 Debugging
Using Debug.Print to verify logging accuracy.
This example assumes a structure in which an input object named "StimDisplay" collects a
response.
'Evaluate the response collected by the StimDisplay object.
'Send the response entered by the subject (RESP), the
'correct response (CRESP), and the accuracy (ACC) to the
'OUTPUT window separated by tabs. View using the DEBUG tab
'in the OUTPUT window.
Debug.Print StimDisplay.RESP & "\t" & StimDisplay.CRESP &_
"\t" & StimDisplay.ACC
The script above will send information to the Debug tab in the Output window as follows: