A multi-line string is a string starting with "
on line X and ending with one more "
on a line below line X.
The values of HTML attributes like title=
enclosed in "
can span over multiple lines.
In C/C++ it is possible to define a string over multiple lines with escaping the line break with a backslash.
A very simple C/C++ example:
Code: Select all
const char csText = "Example of a C string\
which spans over three lines \
because it is quite long (not really true here).";
Well, I would write in C/C++ a long strong not using this method. I prefer the very old syntax most C/C++ programmers don't know:
Code: Select all
const char csText =
"Example of a C string "
"which spans over three lines "
"because it is quite long (not really true here).";
A C/C++ compiler concatenates these three single line strings with just spaces/tabs/newline characters between to one string during compilation. I like this syntax more as the lines can be proper indented. This syntax has also the big advantage that it is possible to compile a program with a constant version string on which the version number inside the string is a preprocessor macro defined in a different source code file (a header file) or even better outside of any source file.
The default for string highlighting is EnableMLS
if the wordfile does not contain this keyword or the keyword DisableMLS
in first line. For that reason UltraEdit searches for next not escaped "
in entire file on typing just one "
and highlights everything between these two quotes on really finding one. Most languages do not support multi-line strings. The interpreter/compiler of the file with such a language would report an error if a line contains "
and there is no matching "
on same line. It is better to add to first line of a language not supporting multi-line strings the keyword DisableMLS
which results in searching for matching "
by UltraEdit only up to end of current line and not highlighting the characters after "
if there is no "
on same line not escaped with the defined escape character.
On the other hand it can be useful to have EnableMLS
defined in the wordfile although the language does not really support it because in this case UltraEdit highlights suddenly a larger block when a quote is missing on a line in code. C/C++ supports multi-line strings, but I usually don't make use of it using first syntax example above. But I have nevertheless in my C/C++ wordfile EnableMLS
to quickly see when a code block is highlighted as string because of a missing quote. Then I can easily see on which line a quote is missing obviously to get a correct syntax highlighting.