Maurice Lombardi wrote:
Miklos Cserzo wrote:
Now the question: what is the compiler switch for interpreting character escape sequences? (Like '\t' for tab, '\n' for new line etc..) The {$E+} directive or the --char-escapes switch does not seems to work.
Double quote the strings (gpc extension, recent I think)
write('\n') -> \n
write("\n") -> identical to writeln
Yes, it's rather recent. As the `News' chapter in the manual says:
: * C style character escapes (`\n', `\007' etc.) are now the default : for strings enclosed in double quotes, while single quoted strings : do not allow them (according to the standard). Accordingly, a : verbatim `"' in a double quoted string is now obtained with `"' : rather than `""' (but a verbatim `'' in a single quoted string : still with `''', of course). Therefore, the option : `--[no-]char-escapes' and the compiler directives `{$E+}'/`{$E-}' : have been dropped. If you used these features, please change to : the appropriate kind of quotes.
Since this is a non-standard extension, you'd better not use it unless absolutely necessary (e.g. use `WriteLn' rather than `Write ("\n")').
Frank