Lexical conventions

Resource files obey the following lexical conventions:

  • Whitespace, except when enclosed in quotes for strings, is ignored by the compiler.

  • Both C-style (/* */) and C++-style (//) comments are supported.

  • Strings must be enclosed with double-quotes.

  • To include a double-quote within a string, enter a double-quote preceded by a backslash. The following resource:

    RESOURCE SIMPLE quote_example
     {
     string="\"text\"";
     }

    where string is of type BUF, generates the output string "text".

  • To include a backslash within a string, enter two backslash characters. The following resource:

    RESOURCE SIMPLE backslash_example
     {
     string="\\text\\";
     }

    generates the output string \text\.

  • You can use the syntax number, to specify a character by character code. If a Unicode resource is being created, this must be a Unicode character value.