Rules for double and single quotes.
Posted: Fri Jul 11, 2003 4:04 pm
Greetings,
Can someone give me the low-down on using quotes in PB? I cannot find any reference...
1. How do you include double quotes in a string? I've determined that the backslash '\' escape does not seem to be supported by PB...
To do this:
Do I have to do this?
That's a pain for sure!
2. What about single quotes? I randomly tried this:
This is good, as it is very C and PHP like. But, again, how do you use a single quote within a single quote?
Those do not work. And what about non-printable characters like newline?
Thanks,
Matthew[/code]
Can someone give me the low-down on using quotes in PB? I cannot find any reference...
1. How do you include double quotes in a string? I've determined that the backslash '\' escape does not seem to be supported by PB...
To do this:
Code: Select all
string$ = "Quotes \"are escaped\" in other languages."
Code: Select all
string$ = "Quotes " + chr(34) + "are escaped" + chr(34) + " in other languages."
2. What about single quotes? I randomly tried this:
Code: Select all
var = 'A'
debug var --> outputs 65
Code: Select all
var = '\''
var = '''
Code: Select all
var = '\n'
var = '\r'
var = '\0' <--- that's a zero
Matthew[/code]