bug-m4
[Top][All Lists]
Advanced

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

Re: 'eval' macro expansion


From: Gary V. Vaughan
Subject: Re: 'eval' macro expansion
Date: Tue, 24 Feb 2004 09:03:15 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Anupama Lath wrote:
| I have an expression like this in my input.
| The m4 macroprocessor throws an error if there are spaces before the
| opening/closing parantheses.
| eval ( 12| ( 72-1 ) , 16 )
|      ^                        ^
| Is this a bug in gnu m4 1.4.

~From the manual:

Macro invocation
================

Macro invocations has one of the forms

~     name

which is a macro invocation without any arguments, or

~     name(arg1, arg2, ..., argN)

which is a macro invocation with N arguments.  Macros can have any
number of arguments.  All arguments are strings, but different macros
might interpret the arguments in different ways.

~   The opening parenthesis *must* follow the NAME directly, with no
spaces in between.  If it does not, the macro is called with no
arguments at all.


futhermore:

Quoting macro arguments
=======================

~   Each argument has leading unquoted whitespace removed.  Within each
argument, all unquoted parentheses must match.


Thus you are passing a radix of `16 ' (only leading unquoted whitespace is
removed), which is not a number!

HTH,
        Gary.
- --
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://www.oranda.demon.co.uk
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAOxNTFRMICSmD1gYRAtApAKDK/TduGf+Dn5211J4/JaLYGNYSAwCePXLL
x8Nwm0kRPxdUZuQlfBWlPRk=
=zfvq
-----END PGP SIGNATURE-----




reply via email to

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