[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Macro defining macros...
From: |
Carlo Contavalli |
Subject: |
Macro defining macros... |
Date: |
Fri, 31 Dec 2004 17:17:36 +0100 |
Hello, I'm not subscribed to the list (can you carbon copy
my address when replying?) and couldn't find any reference
in the manual...
I'm trying to do something like:
define(`macro1', `define(`macro2', `$0 -- $1 -- $2')')
macro1
macro2(foo, bar)
When expansion takes place, however, I get:
-- --
This means that expansion of macro1 succesfully defined
macro2, but macro2 is not getting $1, $2, correctly...
I would expect to have something like:
macro2 -- foo -- bar
Any suggestion on how to make the above work? What am
I doing wrong?
the following leads to ``strange'' results:
define(`macro1', `define(`macro2', `$0 -- $1 -- $2')')
macro1(foo, bar)
macro2(but, kis)
macro2(pit, pot)
output:
-- foo -- bar
-- --
Thanks for any help,
Cheers,
Carlo
--
GPG Fingerprint: 2383 7B14 4D08 53A4 2C1A CA29 9E98 5431 1A68 6975
-------------
The best book on programming for the layman is "Alice in Wonderland";
but that's because it's the best book on anything for the layman.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Macro defining macros...,
Carlo Contavalli <=