Group: Forum Members
Posts: 19,
Visits: 69
|
Hi. I am trying to get a conditional branch to work. 3 sentences are presented. For only some of the sentences there is a comprehension question. I've tried to achieve this using a conditional statement so that the question trial is triggered only when the question item is not an empty string (/ branch = [if(text.question != "")trial.questionTrial]). However, the question trial is triggered all the time.
Is there a problem with my conditional statement?
Thanks
Nick
<item sentences> / 1 = "A dog is a canine" / 2 = "A cat is a feline" / 3 = "A bear is ursine" </item>
<item questions> / 1 = "" / 2 = "Did this sentence mention a cat?" / 3 = "" </item>
<text sentence> / items = sentences / select = sequence </text>
<text question> / items = questions / select = text.sentence.currentindex </text>
<trial sentenceTrial> / stimulusframes = [1 = sentence] / validresponse = ("Y", "N") / branch = [if(text.question != "")trial.questionTrial] </trial>
<trial questionTrial> / stimulusframes = [1 = question] / validresponse = ("Y", "N") </trial>
<block block> / trials = [1-3 = sentenceTrial] </block>
<expt expt> / blocks = [1 = block] </expt>
|