[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Access macro variable via an expression
From: |
Neil.Mowbray |
Subject: |
Access macro variable via an expression |
Date: |
Fri, 8 Jan 2010 04:44:52 +0800 |
Folks,
Is it possible to access macro arguments using an expression?
For example, using m4sugar's m4_for() I would like to be able
to do things like
m4_changequote()
m4_changequote([,])
m4_define([m4__print_arguments],
[m4_for([aArg], 1, $#, +1, [ aArg = $aArg ])])
m4__print_arguments(A, B, C, D, E)
And have the expression $aArg evalute to values of $1, $2 ... as
the macro aArg ranges over 1,2, .... That is, have the above produce
1 = A 2 = B 3 = C
Rather that what it does produce which is
1 = $1 2 = $2 3 = $3
Regards, Neil
- Access macro variable via an expression,
Neil.Mowbray <=