01-10-2005, 12:27 PM
Quote:So what makes \n more readable than ~n, while people want the pre-processor directives inside the comments '$? Forget the readability..
in FAT based OS (Win9x), ~ is part of the real 8.3 long file name. When we use directx 3D file converted using some tools, some long file name or long directory name will be substituted to 8.3 dos name. this would mess up some file or text based file processing.
using "\" doesn't make FB become C/C++ for someone might worried about that. Basic compiler like Rapid-Q use that eficiently. below is the table used in Rapid-Q:
Code:
Escape Sequence Details
------------------------------------------
\a Alarm bell
\b Backspace
\f Form feed
\n New line
\r Carriage return
\t Horizontal Tab
\v Vertical Tab
\\ Backslash
\" Double quote
\### ### is any number 0..255
\xHH HH is a hexidecimal value 00..FF
This also helps if some C/C++ header that containing GUID string which is not require change at all. You'll found them in OLE/COM header.
if "\" will conflict with path separator in text string, it will be easily subsituted with "\\". But if "~" conflict with short file name "ABCDEF~1.EXT" in a text content, how do you deal with that?
"\" usage I think not bound byt C/C++ compiler. I've seen them in other language including Web scripting, if I'm not mistaken. It seem like widely used standard escape sequence.
using ON/OFF block is giving you better handling for the source code conversion. so within the block, conversion can be made replacing those escape sequence to hex or whatever character symbol you set within the string. similar like BEGIN ASM...END ASM block. Only particular area will effected by the usage.
= inc(¢)