+x+xis treated as a string, integer, etc. depends on how it's used throughout the code, and the runtime will figure out the proper data type in each context on the fly. Since data output is highly configurable, there is no way to make a blanket statement about the data type of each logged variable either, this would indeed depend entirely on the script / its specific output.
Interesting. So we could for example, do something like:
<values>
/ number = 1
</values>
<trial sometrial>
(someattributes)
</trial>
<trial someothertrial>
/ values.number = "A"
(someotherattributes)
</trial>
In this case, values.number in the context of sometrial would be an integer, but in the context of someothertrial, it would be a string?
Apart from your example not being valid syntax, yes, it's perfectly possible for a given value to change it's data type on a trial-by-trial basis. E.g.
<values>
/ myvalue = 0
</values>
<list someintegers>
/ items = (10, 100, 1000, 10000)
</list>
<list somestrings>
/ items = ("a cat", "a dog", "a cow", "a bird")
</list>
<trial a>
/ ontrialbegin = [
values.myvalue = list.someintegers.nextvalue;
values.myvalue = values.myvalue / 2;
]
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>
<trial b>
/ ontrialbegin = [
values.myvalue = list.somestrings.nextvalue;
values.myvalue = concat(values.myvalue, " says...?")
]
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>
<text mytext>
/ items = ("<%values.myvalue%>")
</text>
<block myblock>
/ trials = [1-4 = sequence(a,b)]
</block>
<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode response latency values.myvalue)
/ separatefiles = true
</data>