manpagez: man pages & more
info m4
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

12.1 Decrement and increment operators

Increment and decrement of integers are supported using the builtins incr and decr:

Builtin: incr (number)
Builtin: decr (number)

Expand to the numerical value of number, incremented or decremented, respectively, by one. Except for the empty string, the expansion is empty if number could not be parsed.

The macros incr and decr are recognized only with parameters.

incr(`4')
⇒5
decr(`7')
⇒6
incr()
error-->m4:stdin:3: empty string treated as 0 in builtin `incr'
⇒1
decr()
error-->m4:stdin:4: empty string treated as 0 in builtin `decr'
⇒-1

This document was generated on September 29, 2013 using texi2html 5.0.

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