Re: [exim] problem with ${if } in nested and {} condition

Top Page
Delete this message
Reply to this message
Author: Marten Lehmann
Date:  
To: exim-users
Subject: Re: [exim] problem with ${if } in nested and {} condition
Well,

> Grrr. I wish I could reclaim all the time I've spent looking for
> misplaced curly braces for complicated Exim expressions. It really is
> an eye-reddening nightmare. (FWIW, I usually end up making Exim macros
> for logically complete subparts of such complicated expressions, and
> then I usually get the syntax right within a couple of hundred tries. :-)


Exim's macros are nothing more than a sort of string expansion. But
these macros are no separate functions which return a value. They just
replace the code at runtime. That means a code like this:

COND = eq{}{}
condition = ${if COND}

is nothing else than

condition = ${if eq{}{}}

but it does not add anything in the possiblities, it just maybe allows
to reuse some definitions and make code more readable.

Regards
Marten