CyberSoft CVDL

CVDL Tutorial

16. Using VDL Macros

VDL macros are invoked by specifying their name after a $ character.

Macros are lexical tokens, which means that they can not be confused with other tokens, e.g. strings. Thus:

  "abc", $mac, ...

Invokes the macro named mac, but:

  "abc$mac", ...

Does not invoke any macro, and is simply a literal string.

  • VDL macros can be nested to unlimited depth, so macros can refer to other macros in their definition.
  • Macros can not be used in a VDL rule before being defined, but they can be used in other VDL macro $define's before being defined.
  • Macros have per-file scope; macros defined in one VDL file do not carry over to other VDL files.

Listen to the audio\

Contents | Previous | Next