Displaying The Information Within An Array

David McFarlane mcfarla9 at msu.edu
Mon Sep 14 21:23:39 UTC 2009


McGree,

I assume that "You made [...]" is text from your feedback Text or 
Slide object.  In that case you must learn that between the square 
brackets you must enter an "attribute reference", you may not use an 
actual variable there (an easy bit of confusion when coming to 
E-Prime from other programming systems).  So you will need to change 
your feedback Text or Slide to something like

You made [Hits] hits.
You made [Misses] misses.
You made [FalseAlarms] false alarms.

And then in script before your feedback Text or Slide you might do 
something like

c.SetAttrib "Hits", Hits(TrialNumber)
c.SetAttrib "Misses", Misses(TrialNumber)
c.SetAttrib "FalstAlarms", FalseAlarms(TrialNumber)

(Note, BTW, that variables and attribute references may have the same name.)

For more info, you might start with the Context Object topic in the 
online E-Basic Help.  In general, the online E-Basic Help is the real 
documentation for E-Prime.

Hope this helps,
-- David McFarlane, Professional Faultfinder


At 9/11/2009 02:46 PM Friday, you wrote:
>Hello,
>      I am new to E Prime but I have had a little experience with other
>programming languages.  Currently, I am trying to fill an array with
>information and then display the information from a particular trial
>number at the end of that trial.  However, when I run the program I
>get an error when it goes to display the information (on the feedback
>screen) from the array.  The code looks like the following:
>You made [Hits(TrialNumber)] hits.
>You made [Misses(TrialNumber)] misses.
>You made [FalseAlarms(TrialNumber)] false alarms.
>
>Can anyone help me set this up correctly or provide a source for more
>information?  Any help would be appreciated!  Thanks in advance!


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