Using reserved words in Print texts



Your response from Yahoo Forum:
Found it. When you’re using the line continuation (_ at the end of the line), the Translator can get fooled.

How does it happen that VarWordWidth does not work?

Yes, I’ve found the continuation symbol sometimes is not always effective… not sure if this is the issue affecting the ‘reserved words’ problem.

I used Print to display a ONE line text field containing a variable called VarWordTo and it worked perfectly.

I used the same variable in a multiline text field (with line continuation characters) and the first half of the text field, up to and including … ", VarWordTo, "… did NOT show at all, but the remainder of the text field DID show… I replaced … ", VarWordTo, "… with … to … and the whole text field displayed, but with ‘To’ capitalized, color blue and bold.

My sense is that you are right, it’s the line continuation character that’s causing the problem… my workaround will be to eliminate the line continuation character for text fields, using separate ‘expressions’ for each line and replace ‘reserved words’ in the text with variables.

Thanks, George… Happy Easter!



In the case of VarWordTo, you’re combining two strings. Use the concatenation operator like this:

including … " & VarWordTo & "… did NOT show at all

We’ll be fixing the problem with reserved words in line continuation strings.


Hmmm… this code works (w/o the &'s)…

Function Button1_onclick()
Dim VarWordWith = "with"
Print "This is test of using a variable ", VarWordWith, " a Print text."
End Function


So are you all set then?


I’m all set now, George… thanks for your patience!


closed #6

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.