Hello,

 

I’m not sure if this is a bug or not (probably not though – it might be a bug in the documentation though J).

 

I’m using m4 –version = GNU m4 1.4.2

 

It would appear that $1 for bar is being invoked without a parameter call, is this normal?

 

Thanks,

 

Daniel.

 


From: Daniel Deptford
Sent: 29 November 2004 17:23
To: progs
Subject: gnu m4

 

Hello there,

 

I’m using the gnu m4 macro processing utility, but I’ve got a little problem.  To put it simply, I want to supply macros as a parameters to other macros for them to execute with an argument list.

 

define(foo, $1)

define(bar, $1($2) )

bar(foo, fwap)

 

Now this should display just fwap by itself, as bar should invoke foo with bar’s second parameter, but it appears to be just invoking foo with zero parameters, and then printing out ($2) which expands to fwap.  So I get (fwap) instead of fwap.

 

Anyone out there who can help?

 

Cheers

 

Dan

_______________________________________________
Bug-m4 mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/bug-m4

Reply via email to