Thanks a lot! I've got my more complicated macro definitions working now :)
This stuff is great for auto-generating .cpp and .h files, god the c macro preprocessor sucks :) Cheers, Daniel -----Original Message----- From: Gary V. Vaughan [mailto:[EMAIL PROTECTED] Sent: 29 November 2004 18:32 To: Daniel Deptford Cc: [EMAIL PROTECTED] Subject: Re: FW: gnu m4 Hi Daniel, You're not quoting correctly! Daniel Deptford wrote: > 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) This evaluates to: bar( , fwap) since the first parameter is calling foo with no arguments. You should have put: bar(`foo', `fwap') so that when bar is called, foo hasn't been expanded yet. HTH, Gary. -- Gary V. Vaughan ())_. [EMAIL PROTECTED],gnu.org} Research Scientist ( '/ http://tkd.kicks-ass.net GNU Hacker / )= http://www.gnu.org/software/libtool Technical Author `(_~)_ http://sources.redhat.com/autobook _______________________________________________ Bug-m4 mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/bug-m4
