LISTSERV Maestro 11.1-3 Help Table Of Contents

Calculation Formulas

Back to Calculation Formulas Overview
Back to Functions Overview


Quote-Escaping Rules

Any string literal in a formula is surrounded with double quotes like this:

"This is my string literal"

However, if the text itself is supposed to contain the quote character (") anywhere, special rules need to be obeyed. This is because if the quote was to be included just like that, LISTSERV Maestro would interpret it as the closing quote of the text and would try to interpret the rest of the text as part of the formula - which will almost always cause a syntax error, or at least give undesirable results.

Therefore, any quote character in the actual text must be escaped by "doubling" it. If you want to include a quote in the text, you must type two quotes, one right after the other, with no space between them ("").

During formula calculation, this "double-character" of two quotes will then be de-escaped back to a single appearance of the quote-character.

For example, if this is your string literal:

This is my "string" literal

Then the correctly quote-escaped and quote-enclosed version of this literal would be:

"This is my ""string"" literal"

Which would, when used in the formula calculation, once again appear like the un-escaped version:

This is my "string" literal

© 2002-2023 L-Soft Sweden AB. All rights reserved.