quote:
Originally posted by phalanxii
Another script editor colouring bug:code:
Debug.Trace("\\\"");
It appears that the editor takes the apostrophe as part of the string if there is a backslash before it ("\"" resulting in "), unless there is another backslash before that backslash ("\\" resulting in \). However, as seen above, it doesn't take into account a third back slash ("\\\"" resulting in \").
That is not a bug and is actually as it should be...
Backslashes are special escape characters which tell JScript that a literal character is following. Such an '
escape character' or '
metacharacter' is needed if you want to use special characters like \ and " in a string.
\\ will result in the character \
\" will result in the character "
\n will result in a new line character
\x50 will result in the character with hexadecimal code 0x50
etc...
This is the same in many more languages too...
See
JScript documentation.