Evaluating arithmetic expressions with macros (eval)

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

 



Dear all,

I find myself stuck with something which I assume is trivial. I define:

m4_define([X], [9])
m4_define([Y], [3])

And I would like to define Z as being the arithmetic sum of X and Y and
can seem to get it.

I tried several variations of eval but had no success. I understand
that all the macros need to be expanded before eval is called but I
don't understand how to do it.

Any help warmly appreciated.

Thanks in advance,

Seb.




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux