m4: Incr
1
1 12.1 Decrement and increment operators
1 ======================================
1
1 Increment and decrement of integers are supported using the builtins
1 'incr' and 'decr':
1
1 -- Builtin: incr (NUMBER)
1 -- Builtin: decr (NUMBER)
1 Expand to the numerical value of NUMBER, incremented or
1 decremented, respectively, by one. Except for the empty string,
1 the expansion is empty if NUMBER could not be parsed.
1
1 The macros 'incr' and 'decr' are recognized only with parameters.
1
1 incr(`4')
1 =>5
1 decr(`7')
1 =>6
1 incr()
1 error->m4:stdin:3: empty string treated as 0 in builtin `incr'
1 =>1
1 decr()
1 error->m4:stdin:4: empty string treated as 0 in builtin `decr'
1 =>-1
1