bug-m4
[Top][All Lists]
Advanced

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

Re: $# handles zero arguments incorrectly.


From: Eric Blake
Subject: Re: $# handles zero arguments incorrectly.
Date: Sat, 12 Jan 2008 16:54:44 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666

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

According to R. Clayton on 1/12/2008 12:08 PM:
|   $ m4 --version
|   m4 (GNU M4) 1.4.10
|   $ cat bad
|   define(`nargs', `$#')
|   nargs()

Not a bug.  You were invoking nargs with one argument, the empty string.
To invoke a macro without arguments, you must omit the ().  The manual
should make this clear:
http://www.gnu.org/software/m4/manual/html_node/Pseudo-Arguments.html#Pseudo-Arguments

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHiVND84KuGfSFAYARAlE5AJ9QYNxqPTO3ySWNT5tk+hxcHlhWCwCg0kpw
DZdh0xJi9jLo2rz7YkJtCfI=
=fVXD
-----END PGP SIGNATURE-----




reply via email to

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