m4-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: very basic question incr


From: Raphael 'kena' Poss
Subject: Re: very basic question incr
Date: Wed, 11 Jan 2012 19:57:27 +0100

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 · address@hidden · +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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]