[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
M4 problem with escaping macro arguments
From: |
Chris Leishman |
Subject: |
M4 problem with escaping macro arguments |
Date: |
Thu, 5 Jul 2001 18:01:07 +1000 |
User-agent: |
Mutt/1.3.18i |
Hi all,
According to the info page:
If you want a macro to expand to something like `$12', put a pair of
quotes after the `$'. This will prevent `m4' from interpreting the `$'
sign as a reference to an argument.
However, with gnu m4 version 1.4, the following results are observed:
$ m4 --version
GNU m4 1.4
$ echo "define(y, \$1-\$\`'2)y(5,6)"
define(y, $1-$`'2)y(5,6)
$ echo "define(y, \$1-\$\`'2)y(5,6)" | m4
5-6
$
Expected output was "5-$2".
Thanks,
Chris
- M4 problem with escaping macro arguments,
Chris Leishman <=