\chapentry {Introduction and preliminaries}{1}{1} \secentry {Introduction to \code {m4}}{1}{1}{1} \secentry {Historical references}{1}{2}{1} \secentry {Invoking \code {m4}}{1}{3}{2} \secentry {Problems and bugs}{1}{4}{5} \secentry {Using this manual}{1}{5}{5} \chapentry {Lexical and syntactic conventions}{2}{6} \secentry {Names}{2}{1}{6} \secentry {Quoted strings}{2}{2}{6} \secentry {Other tokens}{2}{3}{6} \secentry {Comments}{2}{4}{6} \chapentry {How to invoke macros}{3}{7} \secentry {Macro invocation}{3}{1}{7} \secentry {Preventing macro invocation}{3}{2}{7} \secentry {Macro arguments}{3}{3}{8} \secentry {Quoting macro arguments}{3}{4}{9} \secentry {Macro expansion}{3}{5}{9} \chapentry {How to define new macros}{4}{10} \secentry {Defining a macro}{4}{1}{10} \secentry {Arguments to macros}{4}{2}{10} \secentry {Special arguments to macros}{4}{3}{11} \secentry {Deleting a macro}{4}{4}{12} \secentry {Renaming macros}{4}{5}{12} \secentry {Temporarily redefining macros}{4}{6}{13} \secentry {Indirect call of macros}{4}{7}{14} \secentry {Indirect call of builtins}{4}{8}{14} \chapentry {Conditionals, loops and recursion}{5}{15} \secentry {Testing macro definitions}{5}{1}{15} \secentry {Comparing strings}{5}{2}{15} \secentry {Loops and recursion}{5}{3}{16} \chapentry {How to debug macros and input}{6}{18} \secentry {Displaying macro definitions}{6}{1}{18} \secentry {Tracing macro calls}{6}{2}{18} \secentry {Controlling debugging output}{6}{3}{19} \secentry {Saving debugging output}{6}{4}{20} \chapentry {Input control}{7}{21} \secentry {Deleting whitespace in input}{7}{1}{21} \secentry {Changing the quote characters}{7}{2}{21} \secentry {Changing comment delimiters}{7}{3}{22} \secentry {Changing the lexical structure of words}{7}{4}{22} \secentry {Saving input}{7}{5}{24} \chapentry {File inclusion}{8}{25} \secentry {Including named files}{8}{1}{25} \secentry {Searching for include files}{8}{2}{26} \chapentry {Diverting and undiverting output}{9}{27} \secentry {Diverting output}{9}{1}{27} \secentry {Undiverting output}{9}{2}{28} \secentry {Diversion numbers}{9}{3}{29} \secentry {Discarding diverted text}{9}{4}{29} \chapentry {Macros for text handling}{10}{31} \secentry {Calculating length of strings}{10}{1}{31} \secentry {Searching for substrings}{10}{2}{31} \secentry {Searching for regular expressions}{10}{3}{31} \secentry {Extracting substrings}{10}{4}{32} \secentry {Translating characters}{10}{5}{32} \secentry {Substituting text by regular expression}{10}{6}{33} \secentry {Formatted output}{10}{7}{33} \chapentry {Macros for doing arithmetic}{11}{35} \secentry {Decrement and increment operators}{11}{1}{35} \secentry {Evaluating integer expressions}{11}{2}{35} \chapentry {Running UNIX commands}{12}{38} \secentry {Executing simple commands}{12}{1}{38} \secentry {Reading the output of commands}{12}{2}{38} \secentry {Exit codes}{12}{3}{38} \secentry {Making names for temporary files}{12}{4}{39} \chapentry {Miscellaneous builtin macros}{13}{40} \secentry {Printing error messages}{13}{1}{40} \secentry {Exiting from \code {m4}}{13}{2}{40} \chapentry {Fast loading of frozen states}{14}{41} \chapentry {Compatibility with other versions of \code {m4}}{15}{43} \secentry {Extensions in GNU \code {m4}}{15}{1}{43} \secentry {Facilities in System V \code {m4} not in GNU \code {m4}}{15}{2}{44} \secentry {Other incompatibilities}{15}{3}{44} \unnumbchapentry {Concept index}{45} \unnumbchapentry {Macro index}{47} .