Menu

"and" and "or" conditions

Help
robandrox
2008-02-05
2012-12-14
  • robandrox

    robandrox - 2008-02-05

    I have a doubt about the "and" condition.Does it must be always the first condition inside a rule or can it appears in other position??And about "or" condition, can it appears in the first position of a rule??

     
    • robandrox

      robandrox - 2008-02-05

      I have another doubt.Which are the possible combinations between the diferent "timer" conditions??
      I know some of them:
      -at
      -at and until
      -every

      Are the next combinations possible??

      -at,until and during
      -every and during
      -at,until and every

       
    • jef2000

      jef2000 - 2008-02-05

      Hi,

      You can put any of the conditions (and ,or ,not, timer or object) at every place where a condition is expected.
      In a rule, you can have for example:
      <condition type="xxx">
        <condition type="yyy">
          <condition type="zzz">
            <condition type="object" .../>
            <condition type="object" .../>
            <condition type="not">
              <condition type="object" .../>
            </condition>
            <condition type="object" .../>
          </condition>
          <condition type="object" .../>
          <condition type="object" .../>
        </condition>
        <condition type="object" .../>
      </condition>
      where xxx, yyy and zzz are any combination of "and" and "or".

      I don't understand what you mean by "first condition inside a rule". There is always one and only one condition inside a rule. If the condition becomes true, the first action list is executed (if present). If the condition becomes false, the second action-list is executed (if present)

      In the wiki (http://linknx.wiki.sourceforge.net/Condition%27s+Syntax), you can read:
      Elements at and every can't be used at the same time, but one of them must be specified.
      Elements until and during can't be used at the same time.

      And this means:
      -at,until and during  ==> INVALID
      -every and during     ==> OK
      -at,until and every   ==> INVALID

      Regards,

      Jean-François

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.