User`s guide
E-Prime User’s Guide
Chapter 4: Using E-Basic
Page 126
Test
Once the first step is implemented, it MUST be tested thoroughly. If a problem is discovered, it is
important to fix it now rather than later. Testing is particularly important in research. Precision
testing is described in Chapter 2-Using E-Studio in this volume.
Debug
Search through the code to find the problem and then correct it. There are many tricks to make
debugging less painful than taking a stab in the dark. Debugging tips are included later in this
chapter, in section 4.8.
Implement the Next Segment
After the first segment of code is thoroughly tested and there is confidence that it is working as
expected, begin to implement the next section of the task.
Test
Repeat the testing procedure. It is important to be confident in the code.
Debug
Repeat the debugging process if necessary.
Keep Testing
Repeat the testing procedure until there is certainty the code is working as designed. When there
is confidence in the functionality of the code, be certain to run a few pilot subjects. This is critical,
because it is often the case that the subject will uncover a flaw. Rather than losing an actual
subject to this disaster, it is best to find the problem with a pilot subject.
4.1.2 Basic Steps
Included in this chapter is a section presenting the Basics Steps for Writing E-Prime Script (see
Section 4.4). Even if there is familiarity with writing script, and especially if not, the basic steps
offer helpful information for scripting within E-Prime. Be sure to review the Basic Steps for
Writing E-Prime Script section as an effective tool in learning to use E-Prime.
4.2 Introducing E-Basic
E-Basic is truly a standard language, which has been customized to better fit the needs of real-
time research. It is nearly identical to Visual Basic for Applications™. Essentially, the only part of
VBA that will not transfer to E-Basic is the forms used in VBA.
E-Basic is a standard object-oriented programming language with over 800 commands. Some of
the E-Basic commands were specially developed by PST to accommodate the unique
requirements of behavioral research. Unlike BASIC, PASCAL or the MEL Language (from MEL
Professional), E-Basic is object-oriented. The previous languages were command driven but still
resembled ordinary English. E-Basic is object driven and still resembles ordinary English.
Comparatively, E-Basic is user-friendly, unlike other more advanced languages (e.g., C++).
E-Basic is used to expand the power of E-Studio in a few ways. First, the E-Basic script
generated as a result of the graphical components used to build the experiment may be used as
an informative tool. The script required by an entire experiment is generated into an E-Basic
script file (EBS) simply by pressing the Generate tool button. Direct editing of this script file is