-->
Page 1 of 2

double quotes problem

PostPosted: Thu Jan 14, 2016 1:06 pm
by luc VdV
Code: Select alllet test = 0
button "test" [do_something]
print "test"
print test
wait

[do_something]
end


the button should use the string "test" but it uses the value of the var test.
it also prints 2 times 0 to the terminal.
It seems the quotes are ignored by the interpreter.

Re: double quotes problem

PostPosted: Thu Jan 14, 2016 2:33 pm
by Barnabybear
Hi, I've seen this before, I think you need to double double quote.
Code: Select allbutton ""test"" [do_something]


The outer quotes stop the inner quotes functioning as quotes, if that makes any sense.

Re: double quotes problem

PostPosted: Thu Jan 14, 2016 7:46 pm
by Mmiscool
Add a symbol like @ to all your variables like test@

Re: double quotes problem

PostPosted: Sat Jan 16, 2016 12:24 pm
by viscomjim
Mike, could you explain this a bit more? Should we use the @ for all variables, string, numbers, etc. or just numbers? What does this actually do in this case?