Is It Possible to Display the Value of a Global Variable On Screen?
 
 
 
PST User Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Is It Possible to Display the Value of a... Expand / Collapse
Author
Message
Posted 6/12/2008 1:12:09 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 6/12/2008 3:28:06 PM
Posts: 6, Visits: 29
I am creating an informal test and I am counting up the number of false alarms and correct responses during the course of the trials using global variables. Is it possible for me to display the value of these variables using a TextDisplay object or slide object? I would like to have the results of the test shown on screen at the end of the session. Thanks for any help that can be provided.
Post #1669
Posted 6/12/2008 1:50:20 PM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: 10/2/2008 5:04:58 PM
Posts: 208, Visits: 589
Sure. Suppose your global variables are NFalseAlarms and NCorrectResponses, and your final TextDisplay is SummaryText.


(1) Then you could display your variables by putting the following inline script before SummaryText:

SummaryText.Text = "NFalseAlarms: " & NFalseAlarms _
& "NCorrectResponses: " & NCorrectResponses

(BTW, you could also do this with a humble MsgBox, e.g.,
MsgBox "NFalseAlarms: " & NFalseAlarms _
& "NCorrectResponses: " & NCorrectResponses
)


(2) Or, in SummaryText you could put something like

NFalseAlarms: [NFalseAlarms]
NCorrectResponses: [NCorrectResponses]

and pass your variables in as attributes in a bit of inline before SummaryText, e.g.,

c.SetAttrib "NFalseAlarms", NFalseAlarms
c.SetAttrib "NCorrectResponses", NCorrectResponses


I prefer the second method because (a) it just seems more E-Prime-like, and (b) it also logs your variable values to the .edat file.

-- David McFarlane, Professional Faultfinder
Post #1670
Posted 6/12/2008 3:29:05 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 6/12/2008 3:28:06 PM
Posts: 6, Visits: 29
Thank you for the info, this will prove very useful.
Post #1673
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -5:00, Time now is 9:27am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.063. 9 queries. Compression Disabled.