-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Gary V. Vaughan on 12/29/2006 1:27 PM: > Hi Eric,
Hi Gary, and happy new year, > > On 28 Dec 2006, at 14:41, Eric Blake wrote: >> The current wording of the m4 eval macro forbids implementations from >> providing the , and ?: operators as extensions, even though these >> operators could reasonably be implemented (all of the other forbidden >> operators involve C language constructs that are not available with >> strict numerical evaluations). The BSD implementation of M4 already >> provides ?:. > > Agreed. As long as extensions are labeled as such for each > implementation, the onus is on the user to decide whether to > use the extension and lock their code in, or ignore the extensions > in exchange for having portable code. > > I think the only change in the POSIX wording would be to remove > the forbid aspect, and instead list all the required operators. Here's the aardvark I finally submitted: https://www.opengroup.org/sophocles/show_mail.tpl?CALLER=index.tpl&source=L&listname=austin-review-l&id=2250 In preparing the aardvark, I also realized that it may be worth adding the following GNU extension in m4 2.0. Currently, if eval encounters a word (ie. macro name), it is a syntax error. But we could check if the definition of that macro is a number, and thus support variables; once variables are supported, we can then also support assignment operators. Thus "define(a,1)ifelse(eval(`a++'))a" would expand to "2", similar to the shell construct "a=1; : $((a++)); echo $a". - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----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 iD8DBQFFm75Z84KuGfSFAYARAj4+AJ4h8ndRMerkffd0/cdcnroeEHrYBQCfV2hf GOrvHbJYw44jr6LVlXp1Enw= =m0cD -----END PGP SIGNATURE----- _______________________________________________ M4-discuss mailing list M4-discuss@gnu.org http://lists.gnu.org/mailman/listinfo/m4-discuss