question – variable within a range

Clovertech Forums Cloverleaf question – variable within a range

  • Creator
    Topic
  • #120445
    Phillip Huckeby
    Participant

      Why doesn’t the bolded work?

      set newClock [clock seconds]
      set timeZone [clock format $newClock -format “%z”]
      set dtLength [string length $xlateInVals]
      if {12>= $dtLength <19} {
      set num1 [string range $xlateInVals 0 11]
      set num2 “00”
      set num3 $timeZone
      set xlateOutVals [concat $num1$num2$num3]
      }

      I had to change it to this.

      set newClock [clock seconds]
      set timeZone [clock format $newClock -format “%z”]
      set dtLength [string length $xlateInVals]
      if {$dtLength >=12 && $dtLength <19} {
      set num1 [string range $xlateInVals 0 11]
      set num2 “00”
      set num3 $timeZone
      set xlateOutVals [concat $num1$num2$num3]
      }

    Viewing 0 reply threads
    • Author
      Replies
      • #120450
        Charlie Bursell
        Participant

          You are trying to combine 2 operations into one – not supported.
          Tcl does have a mathop function may do this but it does not seem to be supported with this version of Tcl

           

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