Page 2 of 2
Posted: Sun Jul 13, 2003 4:36 pm
by GPI
freedimension wrote:Yes, that's true, but I only wanted to show, that there are often more ways to accomplish something than you would expect.
Ok, i what about this, when a string is startet with " the addition marks will work:
( \n = chr(13)+Chr(10) ? )
for example
Code: Select all
a$= " This is a little "test" of what i mean.\n"
would be the same as
Code: Select all
a$=" This is a little "+chr(34)+"Test"+chr(34)+" of what i mean."+chr(13)+chr(10)
What about this?
So it is compatible with older codes.
Posted: Sun Jul 13, 2003 4:51 pm
by freedimension
GPI wrote:
Ok, i what about this, when a string is startet with " the addition marks will work:
( \n = chr(13)+Chr(10) ? )
Yes, that would be fine. But I don't know, how hard it would be to implement this behaviour in the existing PB Parser. Fred?
Another Idea:
Another Compiler Directive switching between the old way of handling strings and the new one (opt-in of course so older code is not touched by this).
Could be called: EscapeCharsOn and EscapeCharsOff or something like this. This would produce cleaner looking Source Code.
Posted: Sun Jul 13, 2003 5:45 pm
by matthew180
What's wrong with having a setting to enable or disable support for escape sequences in strings (double AND single quoted strings)? I posted this suggestion ealier but didn't see anyone comment on it... So I will assume that it is simply the *best* way to accomplish escape sequences, until someone shows me otherwise!
This way Fred could even implement the support for escape sequences over time without having to change exising code. And if it was an option that could be enabled/disabled, he could even request beta testers who simply enable escape sequences and write their code...
Matthew
Posted: Sun Jul 13, 2003 8:35 pm
by GPI
no, please no compilercommand like EscapeCharsOn and EscapeCharsOff
You get only problems with includeing older .pbi (like my scintella.pbi)
GPI
Posted: Sun Jul 13, 2003 10:15 pm
by matthew180
GPI wrote:no, please no compilercommand like EscapeCharsOn and EscapeCharsOff
You get only problems with includeing older .pbi (like my scintella.pbi)
GPI
It would not be a compiler command, but rather a core language function. See my detailed post on page 1...
Matthew
Posted: Sun Jul 13, 2003 10:26 pm
by freedimension
GPI wrote:You get only problems with includeing older .pbi (like my scintella.pbi)
Point for you. This one is trickier than I thought.