Page 1 of 1
Pascal syntax highlight
Posted: Wed Jan 13, 2010 6:44 am
by MSpagni
I just noted that the pascal syntax highlight interprets the backslash ('\') inside a string as an escape character like in C.
As far as I know (free pascal, turbo pascal) this is not true.
Furthermore, if the backslash is the last character before the ending "'", the string is assumed as not closed (that's how I discovered it).
Only a small glitch, but easy to fix, I think.
Re: Pascal syntax highlight
Posted: Wed Jan 13, 2010 8:10 pm
by psguru
Well, according to
http://techpubs.sgi.com/library/tpl/cgi ... /ch01.html backslash is in fact an escape character.
Re: Pascal syntax highlight
Posted: Thu Jan 14, 2010 4:48 am
by MSpagni
SGI Pascal has a special form of character string, enclosed in double quotation marks, in which such characters may be included. A backslash ( \ ) escape character is used to signal the use of a special character.
ANSI Pascal admits only character strings enclosed in
single quotation marks and no escaping.
If you want to include a single quote inside a string you have to type it twice.
So does FreePascal, Turbo Pascal and Delphi.
Re: Pascal syntax highlight
Posted: Fri Jan 15, 2010 9:50 pm
by psguru
MSpagni wrote:ANSI Pascal admits only character strings enclosed in single quotation marks and no escaping.
If you want to include a single quote inside a string you have to type it twice.
So does FreePascal, Turbo Pascal and Delphi.
You're right. Thanks for the clarification. This bug will be fixed in the upcoming 5.0 beta of ExamDiff Pro.