decorative banner

Using keywords as substitutes for control characters


    As already noted, you can use three control characters to specify what happens when a text macro is inserted:

    • Single quotes ('') mark out a selection.
    • The vertical bar places the insertion point.
    • Dollar signs are used to reference another text macro.

    Now and then, syntax rules may require that you insert a macro with any of those characters in it. For example, JavaScript syntax requires that text strings be enclosed in single quotes. This conflict is solved by substituting percent signs (or any other suitable character) for single quotes. The GoLive text macro tool has three built-in keywords that allow you to redefine control characters:

    • Selection lets you redefine the selection markers if single quotes are not allowed. Here is an example:

        Selection = %

        write.document.write('%what%')

    • Caret lets you redefine the insertion point marker if the vertical bar is not allowed--for example because it is used to express a bitwise OR operation in JavaScript.

        CARET = %

    • Macro lets you redefine the dollar signs enclosing a macro name.

        MACRO = %