Defining a character to delimit message text

You can use the $quote directive in a message source file to define a character for delimiting message text. This character should be an ASCII character.

The format is:

$quote [character] [comment]

Use the specified character before and after the message text. In the following example, the $quote directive sets the quote character to _ (underscore), and then disables it before the last message, which contains quotation marks:

$quote _   Use an underscore to delimit message text
$set MSFAC         Message Facility - symbolic identifiers
SYM_FORM   _Symbolic identifiers can contain alphanumeric \
characters or the \_ (underscore character)\n_
SYM_LEN    _Symbolic identifiers can be up to 65 \
characters long \n_
5              _You can mix symbolic identifiers and numbers \n_
$quote
MSG_H     Remember to include the _msg_h_ file in your program\n

The last $quote directive in the previous example disables the underscore character.

In the following example, the $quote directive defines " (double quotation marks) as the quote character. The quote character must be the first non-blank character following the message number. Any text following the next occurrence of the quote character is ignored.

$quote "   Use a double quote to delimit message text
$set 10            Message Facility - Quote command messages
1   "Use the $quote directive to define a character \
\n for delimiting message text"
2   "You can include the \"quote\" character in a message \n \
by placing a \\ in front of it"
3   You can include the "quote" character in a message \n \
by having another character as the first nonblank \
\n character after the message ID number
$quote
4   You can disable the quote mechanism by \n \
using the $quote directive without a character \n\
after it

The preceding example illustrates two ways the quote character can be included in message text:

  • Place a \ (backslash) in front of the quote character.
  • Use some other character as the first non-blank character following the message number. This disables the quote character only for that message.

The preceding example also shows the following:

  • A \ (backslash) is still required to split a quoted message across lines.
  • To display a \ (backslash) in a message, place another \ (backslash) in front of it.
  • You can format a message with a new-line character by using \n.
  • Using the $quote directive with no character argument disables the quote mechanism.