manpagez: man pages & more
info m4
Home | html | info | man

File: m4.info,  Node: Divnum,  Next: Cleardivert,  Prev: Undivert,  Up: Diversions

10.3 Diversion numbers
======================

The current diversion is tracked by the builtin ‘divnum’:

 -- Builtin: divnum
     Expands to the number of the current diversion.

     Initial divnum
     ⇒Initial 0
     divert(`1')
     Diversion one: divnum
     divert(`2')
     Diversion two: divnum
     ^D
     ⇒
     ⇒Diversion one: 1
     ⇒
     ⇒Diversion two: 2

© manpagez.com 2000-2025
Individual documents may contain additional copyright information.