#undef
Prev | Orchestra Opcodes and Operators | Next

## #undef

#undef — Un-defines a macro.

## Description

Macros are textual replacements which are made in the orchestra as it is being read. The macro system in Csound is a very simple one, and uses the characters # and $ to define and call macros. This can save typing, and can lead to a coherent structure and consistent style. This is similar to, but independent of, the macro system in the score language.

#undef NAME -- undefines a macro name. If a macro is no longer required, it can be undefined with #undef NAME.

## Syntax

    #undef NAME

## Initialization

# replacement text # -- The replacement text is any character string (not containing a #) and can extend over mutliple lines. The replacement text is enclosed within the # characters, which ensure that additional characters are not inadvertently captured.

## Performance

Some care is needed with textual replacement macros, as they can sometimes do strange things. They take no notice of any meaning, so spaces are significant. This is why, unlike the C programming language, the definition has the replacement text surrounded by # characters. Used carefully, this simple macro system is a powerful concept, but it can be abused.

## See Also

#define, $NAME

## Credits

Author: John ffitch
University of Bath/Codemist Ltd.
Bath, UK
April 1998

New in Csound version 3.48

Prev | Up | Next
#include | Home | #ifdef