TCL ERROR

  • Creator
    Topic
  • #52505
    Robert Denny
    Participant

      We are using an old PROC that a past employee created in an 5.3 Windows Environment. I have attached the complete .tcl proc.

      We are not able to find out what is causing the error on the new system. We have been asked to modify so that it states

      set newLabType “CH^HOLTER MONITOR REPORT”

      In the proper area of the .tcl.

      Without modifying the proc we are getting this error in the new linux/cl 5.7 environment.

      xlt :xlat:ERR /0:softmed_xlate:05/26/2011 11:23:36] Tcl error:

      msgId = message0

      proc = ‘stringFindEkgPf’

      args = ”

      result = ‘extra switch pattern with no body, this may be due to a comment incorrectly placed outside of a switch body – see the “switch” documentation’

      errorInfo: ‘

      extra switch pattern with no body, this may be due to a comment incorrectly placed outside of a switch body – see the “switch” documentation

         while executing

      “switch -glob — $labType {

      “EK^EK” {

      set newLabType “EKG^Interpretation”

      set newSeg1 “OBX|1|ST|EKG Interp^EKG Interp||”

      set newSeg2 “OBX|…”

         (“run” arm line 31)

         invoked from within

      “switch -exact — $mode {

      start {

      #Preform Special Init Functions

      }

      run {

      #Get Args and put them in variables

      keylget args MSGID m…”

         (procedure “stringFindEkgPf” line 3)

         invoked from within

      “stringFindEkgPf {MSGID message0} {CONTEXT xlt_post} {ARGS {}} {MODE run} {VERSION 3.0}”‘

    Viewing 3 reply threads
    • Author
      Replies
      • #74489
        Jim Kosloskey
        Participant

          Robert,

          Try removing all of the comments in this switch section:

          switch -glob — $labType {

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

        • #74490
          Steve Carter
          Participant

            Robert,

            As Jim stated, it is related to comments.  You need to remove the following:

            ##################################

            ###### END RUN SECTION ###########

            ##################################

            You cannot have any comments between switch patterns.  This comment falls after the last pattern, but before the close of the switch. Comments can only exist within the body of each pattern.

            Hope this helps.

            Steve

          • #74491
            Robert Denny
            Participant

              That did work!

              Taking out the end run section did fix the testing of the modification. Any idea why the proc functions in 5.3, but fails in 5.7?

            • #74492
              Jim Kosloskey
              Participant

                Robert,

                5.7 uses a newer release of Tcl.

                They tightened up the use of compiling of the switch statement to what was already supposed to be the rule. So the use of comments like that was not supposed to be done in the earlier release of Tcl but never raised an error.

                Now it does. Happens all the time with languages. Each new release tightens up to enforce the rules that were in place.

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

            Viewing 3 reply threads
            • The forum ‘Cloverleaf’ is closed to new topics and replies.