CL 19.1.1 Xlate IF issue noted

Clovertech Forums Cloverleaf CL 19.1.1 Xlate IF issue noted

  • Creator
    Topic
  • #118626
    Jim Kosloskey
    Participant

      I was helping someone on CL 19.1.1 and ran across an interesting issue.

      Set  a temp variable (let’s call it @result) using any valid Xlate Action.

      IF @results eq =Y

      do some actions if true…

      ELSE

      do some actions if false…

      In the above pseudo code the only actions actually building an OB message are the true and false logic in the IF.

      Testing the above Xlate results in a default message built as if no actions from either true or false paths were taken – no errors or complaints by the Testing Tool.

      The reason this did not work is the temp variable was spelled @result when set but @results (note the plural) in the IF.

      I think the Testing Tool (and the engine) should throw some sort of complaint. This mis-spelling is easy to do and difficult to find (the real conditional was complex not just the one condition set).

      At the least I wanted others to know about this. It was detected in 19.1.1 but I guess could be in 19.0 or 19.1 or 20.x.

      I cannot report this to support and I cannot check the release notes to see if this has been reported and fixed.

      If someone knows this has been addressed please post and let us know what release and how it has been addressed.

      If someone with any of the other 19.x releases or 20.x releases could test this (should be easy to do) and report that would be nice and helpful.

      email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.

    Viewing 2 reply threads
    • Author
      Replies
      • #118628
        Charlie Bursell
        Participant

          To be clear what you are saying is the engine should throw an error because you used an undefined @ variable, not because you misspelled?  It would be the same as if you said @foo when foo had not been defined.

          Every language I know of would differentiate between result and results as two different variable names.   How many times does it happen in Tcl?  However, Tcl would throw an error that results was an undefined variable.

        • #118630
          Jim Kosloskey
          Participant

            Yes that is correct. My main purpose was to let others know what was observed in 19.1.1 and that it was possible the same thing would occur in other releases.

            If the engine could notify there was an issue with the IF it would make troubleshooting easier I think.

            email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.

          • #118631
            Jeff Dinsmore
            Participant

              Good catch, Jim.

              It should definitely throw an error.

              Let’s say that it’s designed to define variables on-the-fly as they’re used so you never run into an undefined variable condition (I know it doesn’t make any sense, but go with it for a minute…)

              At the very least, if it’s not going to complain about the undefined variable, it should execute either the “IF” action or the “ELSE” action – not just bypass them both.

              Jeff Dinsmore
              Chesapeake Regional Healthcare

          Viewing 2 reply threads
          • You must be logged in to reply to this topic.