Is it possible to create an m4 macro expanding to the next integer of a global counter each time it's called? In other words, assuming the counter has an initial value (e.g. 0), these calls to such a nextcount macro:
First call: nextcount Second call: nextcount Third call: nextcount should generate the following output: First call: 1 Second call: 2 Third call: 3 I'm stumped as I'm not sure updating the global state of a counter is even possible with m4. Is there any way? Thanks, Paolo