Re: very basic question incr

Raphael 'kena' Poss <[email protected]>
Newsgroups gmane.comp.gnu.m4.general
Message-ID <[email protected]>
Op 11 jan 2012, om 19:16 heeft jfw het volgende geschreven:
> I expected 0,1,2 and 2,4
> 

So it looks like you want an auto-increment macro. 

Something like:

define(`thecnt', 0)
define(`count', `define(`thecnt', incr(thecnt)) emit(thecnt)')

would that work?

-- 
Raphael 'kena' Poss · [email protected] · +31 20 525 7559
UvA · FNWI · IvI · CSA · 1098XH 904 Amsterdam (NL)
Real computer scientists despise the idea of actual hardware.  Hardware has
limitations, software doesn't.  It's a real shame that Turing machines are
so poor at I/O.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.