The cn Macro

The cn macro expands cn to Console.Writeln(“”) and demonstrates simple caret control codes by positioning the caret inside the quotation marks.

The definition in the macros.txt file is:

cn
Console.Writeln{(}””{)}{LEFT 2}

The definition contains three places where characters are surrounded by braces.

Each parenthesis must be enclosed in braces, because each has a special meaning. The macro expansion feature is alerted that these characters are to be part of the expansion rather than using their special meaning.

Note:

Switching off the special meaning of a character, when it is enclosed in braces, is called quoting.

The {LEFT 2} expression at the end of the macro definition, means move the caret left two characters, as if the left-arrow had been pressed twice. These caret control codes may be placed anywhere within the macro definition and are executed as they are located.

See Macro Control Codes, for a complete list of caret control codes.