Tcl string trim problem

Clovertech Forums Read Only Archives Cloverleaf Tcl Library Tcl string trim problem

  • Creator
    Topic
  • #52417
    Tom Canavan
    Participant

      I know this should be easy but it isn’t working for me. Can anyone suggest what I’m doing wrong.

      In the translation Pre-Proc I’ve placed this code:

      set xlateOutVals [string trim $xlateInVals]

      The input is from a flat record, 8 characters long with leading blanks, the field is defined as left justified. The destination output still included the blanks and I don’t know why.

      Thanks for your help.

    Viewing 1 reply thread
    • Author
      Replies
      • #74140
        Terry Kellum
        Participant

          Just a guess, but Charlie’s number one rule:

          InVals and OutVals are lists.

          Try this:

          set xlateOutVals

            ]]

            Have not tried out the code, your mileage may vary.

          1. #74141
            Tom Canavan
            Participant

              Thanks! that did it. I knew I was missing something obvious.

              Just in case anyone is going to copy and paste, I corrected the xlateInVals to put the upper case I in there.

              set xlateOutVals

                ]]

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