bug-m4
[Top][All Lists]
Advanced

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

Re: FW: gnu m4


From: Gary V. Vaughan
Subject: Re: FW: gnu m4
Date: Mon, 29 Nov 2004 18:31:49 +0000
User-agent: Mozilla Thunderbird 0.9 (X11/20041103)

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      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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