Extra Characters?

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Extra Characters?

  • Creator
    Topic
  • #49397
    Rick Pritchett
    Participant

      I keep getting this error i was hoping and extra set of eyes might be able to tell me where the problem is.

      errorInfo:

      extra characters after close-brace

         while compiling

      “while {Pos2 != ” “}{

                set Pos2 [string index $OBX5 $Pos1]

      set Pos2[ expr $Pos1 – 1]

                puts $Pos2

      }else {

       

      }

      set xlateOutVal…”

      original code

      lassign $xlateInVals OBX5

      if {[string length $OBX5] > 80} {

      set Pos1 80  

      while {Pos2 != ” “}{

                set Pos2 [string index $OBX5 $Pos1]

      set Pos2[ expr $Pos1 – 1]

                puts $Pos2}

      }else {

       

      }

      set xlateOutVals

    Viewing 1 reply thread
    • Author
      Replies
      • #61779
        garry r fisher
        Participant

          Hi,

          Put a space between your braces. You have }{ should be } {. Same applies to your else statement:

          }else {

          Should be

          } else {

          hope this helps – Tcl is very fussy about spacing with braces.

          Regards

          Garry

        • #61780
          Michael Hertel
          Participant

            Also

            set Pos2[ expr $Pos1 – 1]

            did you mean

            set Pos2 [ expr $Pos1 – 1]

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