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

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Marten Lehmann
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] problem with ${if } in nested and {} condition
Hello,

> Now, re-reading your original, I'm unsure where your "and" comes in?
> Perhaps it's implied by the embedding.


you are right. But if you think of the full condition as a function,
than I have to evaluate the return values of two functions.

Or using variables it would look like this:

if (whatever) {
      if (somewhat) {
          first_result = true;
      } else {
          if (something) {
              first_result = true;
          } else {
              first_result = false;
          }
      }
  } else {
      if (somewhat) {
          first_result = true;
      } else {
        first_result = false;
    }
  }


if (whatever) {
      if (somewhat) {
          second_result = true;
      } else {
          if (something) {
              second_result = true;
          } else {
              second_result = false;
          }
      }


if (first_result == true && second_result == true) {
    -> condition true;
}


John proposed to use two "condition = ..." lines which would be "and"ed
by exim. It just doesn't look as clear. Is there any way to do this in
one "condition = ..." line?

Regards
Marten