Go to the first, previous, next, last section, table of contents.


Defining a macro

The normal way to define or redefine macros is to use the builtin define:

define(name [, expansion])

which defines name to expand to expansion. If expansion is not given, it is taken to be empty.

The expansion of define is void.

The following example defines the macro foo to expand to the text `Hello World.'.

define(`foo', `Hello world.')
=>
foo
=>Hello world.

The empty line in the output is there because the newline is not a part of the macro definition, and it is consequently copied to the output. This can be avoided by use of the macro dnl. See section Deleting whitespace in input, for details.

The macro define is recognized only with parameters.


Go to the first, previous, next, last section, table of contents.