Example code bug

2014-08-16 Thread Florian Mayer
Hello m4 team, I hope that it is an actual bug this time... There is a sample listing for a simple for- loop in the manual at chapter 6.4. The corresponging lines are ==m4code== $ m4 -I examples [...] # forloop(var, from, to, stmt) - simple version define(`forloop', `pushdef(`$1', `$2')_forloop($

Re: Example code bug

2014-08-16 Thread Eric Blake
On 08/16/2014 08:20 AM, Florian Mayer wrote: > Hello m4 team, [rearranging your mail a bit] > > I hope that it is an actual bug this time... Not a bug per se, since, as you point out... > > I am aware of the existence of forloop2, which is listed in the example > code > directory, but I like

Re: Example code bug

2014-08-16 Thread Eric Blake
On 08/16/2014 08:35 AM, Eric Blake wrote: > > existing: >> define(`_forloop', `$4'`ifelse($1, `$3', `', `define(`$1', >> incr($1))$0($@)')') Oops, I think the bug is on YOUR end, for mis-transcribing what is already in the manual. The manual actually says: define(`_forloop', `$4`'ifelse