<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 19.07.2015 16:39, Yaron Cohen-Tal
      wrote:<br>
    </div>
    <blockquote
cite="mid:CADKOXrCdtq3jmqtsK0gKYzzXcOeikT==BE+jAvmwQHbKREyXVA@mail.gmail.com"
      type="cite">
      <div dir="ltr">I want to set "FOO" to "TRUE" iff both "COND_A" and
        "COND_B" are true.I tried the following:
        <div><font face="monospace, monospace"><br>
          </font></div>
        <div><font face="monospace, monospace">set (FOO (${COND_A} AND
            ${COND_B}))</font></div>
      </div>
    </blockquote>
    <br>
    The AND operator is handled and implemented by the if() and while()
    commands and hence not available elsewhere.<br>
    <br>
    <blockquote
cite="mid:CADKOXrCdtq3jmqtsK0gKYzzXcOeikT==BE+jAvmwQHbKREyXVA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>but then FOO get's a value like "(;TRUE;AND;TRUE;)" instead
          of "TRUE". So I had to write instead:</div>
        <div><br>
        </div>
        <div><font face="monospace, monospace">if (${COND_A} AND
            ${COND_B})</font></div>
        <div><font face="monospace, monospace">    set (FOO TRUE)</font></div>
        <div><font face="monospace, monospace">else ()</font></div>
        <div><font face="monospace, monospace">    set (FOO FALSE)</font></div>
        <div><font face="monospace, monospace">endif ()</font></div>
        <div><br>
        </div>
        <div>Is there a better way?</div>
        <br>
      </div>
    </blockquote>
    <br>
    Depending on context you might omit the else() block given that
    if(FOO) will evaluate false if FOO is not a defined variable.<br>
    <br>
    Nils<br>
  </body>
</html>