displaying response count at end of block
Susan Campbell
susangc7 at gmail.com
Fri Jun 7 11:34:53 UTC 2013
Hi Kelsey,
It sounds like you're running into a common problem people have with E-Prime: understanding the difference between variables and attributes. By defining something in the user script, you're declaring it as a variable, not an attribute. Attributes show up in lists and data files; variables don't. You also seem to have a scope issue on the attribute, which is making things more complicated.
What's confusing here is that E-Prime is trying to help you out by creating attributes when you use c.setattrib -- so you now have a total_n attribute as well as a variable, and that's what gets logged in the data file. But that attrbiute only exists in the lowest-level list that's running when E-Prime creates it. I would guess that your attempt to display the counts is outside that list. Alternatively, if you didn't fall into that trap, you're trying to use the variable, which you've actually never assigned a value to.
The first thing to try is to create an attribute in the list that's above the one you're setting the value in (the list that's running when you try to display the value at the end), and then let it set the value in that list. Or you could just keep track of those totals in the global variable you already have (if you don't care about logging as you go) and then log them in an inline after the list.
HTH,
Susan
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/23616f29-c2cc-4093-811d-125c12e74f41%40googlegroups.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
More information about the Eprime
mailing list