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

Top Page
Delete this message
Reply to this message
Author: Mike Cardwell
Date:  
To: exim-users
Subject: Re: [exim] problem with ${if } in nested and {} condition
On 18/02/2010 23:56, Marten Lehmann wrote:

> While this works fine:
>
> and {
>     { eq{}{} }
>     { eq{}{} }
> }

>
> but does not allow for nested conditions since there is no "else". So I
> need an if-condition so I can extend the "that" later.


The alternative way of using eq allows that...

"eq{foo}{bar}{then}{else}"

"eq{foo}{bar}" on it's own is equivalent to:

"eq{foo}{bar}{true}{false}"

So you can do stuff like this:

and {\
    {\
       eq{foo}{bar}\
          {eq{x}{y}}\
          {eq{a}{b}}\
    }\
    {\
       eq{1}{2}\
    }\
}



-- 
Mike Cardwell    : UK based IT Consultant, Perl developer, Linux admin
Cardwell IT Ltd. : UK Company - http://cardwellit.com/       #06920226
Technical Blog   : Tech Blog  - https://secure.grepular.com/
Spamalyser       : Spam Tool  - http://spamalyser.com/