Changing alpha to upper case in TCL

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Changing alpha to upper case in TCL

  • Creator
    Topic
  • #48214
    Dan Loch
    Participant

      Hello TCL experts,

      I have a name element coming across with JR in it like:

      |smith jr^john^j|

      I want to all name elements to upper case in my outbound message.

      I have code

      lassign $xlateInVals Name

       set newName [string toupper $Name]

       set xlateOutVals $newName

      This works fine  but when the name has a space and jr in it, only

      SMITH  is sent.  Does string toupper work this way?

      Thanks,

      Dan

    Viewing 0 reply threads
    • Author
      Replies
      • #58027
        Jim Kosloskey
        Participant

          Dan,

          You forgot to treat xlatOutVals as a list. So the name ‘smith jr’ is a list with two elements and you are only getting the first element.

          Jim Kosloskey

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

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