Feedback and inline script

David McFarlane mcfarla9 at msu.edu
Thu Nov 8 16:32:32 UTC 2012


Um, fearing to tread here because the offered code sample exhibits a 
profound lack of understanding of computer programming which no doubt 
augurs much further trouble to come, but here goes...

The line

         If "TrialStimulus"="sd" then

compares the string "TrialStimulus" to the string "sd" and that will 
always be false, and certainly not what you meant to do.  Then your 
Else If clause performs exactly the same comparison, again certainly 
not what you meant.

So the code that you posted should always fall through to the Else 
clause, which sets NoResponse to "Blank.bmp".  I don't quite see how 
that results in the behavior you describe, but perhaps that happens 
due to other code that you did not post, and in any case your If, 
Else If, Else is deeply flawed.

If you do not yet understand the distinctions between variables and 
literals, and how to use conditionals, then I urge you to first take 
any Introduction to Computer Programming course before proceeding further.

-- David McFarlane


At 11/8/2012 11:09 AM Thursday, Gulshan Tahir wrote:
>Hi Susan
>
>Thank you I have tried that and now it works, wierd. But now I have 
>another problem. All I receive are positive feedback for all 3 
>response types (positive, negative and no response). Is there a way 
>that I can maybe code it a little different so that no response and 
>negative response show up as blank?
>
>Thank you
>
>
>----------
>Date: Thu, 8 Nov 2012 07:58:57 -0800
>From: susangc7 at gmail.com
>To: e-prime at googlegroups.com
>Subject: Re: Feedback and inline script
>
>Not to be a wise-ass, but did you try adding another End If at the end?
>
>(I don't know that your code does what you want it to, but this is a 
>simple fix so you can keep troubleshooting.)
>
>HTH,
>Susan
>
>On Thursday, November 8, 2012 10:53:18 AM UTC-5, 
>pure-... at hotmail.co.uk wrote:
>Hi All
>
>I have managed to receive some feedback for positive groups. However
>when I ran the experiment all the responses excluding negative
>responses were positive. I would like to script both negative and no
>response as blank and had managed to do only the negative.
>My script is as follows but now e-prime comes up with an error stating
>encountered: end of line
>Expecting: End if.
>
>My script:
>
>Dim CorrectAnswer as String
>Dim IncorrectAnswer as String
>Dim NoResponse as string
>
>If "TrialStimulus"="sd" then
>     CorrectAnswer= "Correct"
>
>Else if "TrialStimulus"="sd" then
>         InCorrectAnswer= "Blank.bmp"
>
>Else
>     NoResponse= "Blank.bmp"
>         End if
>
>
>I would like to know what the problem is and how I can fix it as there
>seems to not be working at all now.
>
>Thank you

-- 
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 https://groups.google.com/groups/opt_out.



More information about the Eprime mailing list