www.delorie.com/gnu/docs/m4/m4_25.html   search  
 
Buy GNU books!


GNU macro processor

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.7 Indirect call of macros

Any macro can be called indirectly with indir:

 
indir(name, ...)
which results in a call to the macro name, which is passed the rest of the arguments. This can be used to call macros with "illegal" names (define allows such names to be defined):

 
define(`$$internal$macro', `Internal macro (name `$0')')
=>
$$internal$macro
=>$$internal$macro
indir(`$$internal$macro')
=>Internal macro (name $$internal$macro)

The point is, here, that larger macro packages can have private macros defined, that will not be called by accident. They can only be called through the builtin indir.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003