Adding decimal to string value

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Adding decimal to string value

  • Creator
    Topic
  • #55032
    Corey Lewis
    Participant

    I’m sure I’m missing something easy but I need to get a table value of 12345 to OBX.5 as 123.45.  I’m having issues with it and can’t find my documentation of tcl fragments that would help me out.

    I’ve tried a math DIV function but that only gives me 123 for some reason.

    Any suggestions?

Viewing 2 reply threads
  • Author
    Replies
    • #83851
      Jim Kosloskey
      Participant

      No Tcl needed.

      In Xlate:

      1. MATH DIV

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

    • #83852
      Corey Lewis
      Participant

      Thanks Jim.  That’s exactly what I was looking for.

    • #83853
      Mark Thompson
      Participant

      Hi Corey,

      If you don’t care about trailing zeroes you can use

      MATH DIV

      InitialValue

      =100.

      Note the decimal point is significant in the 100.  It instructs Tcl to use floating point instead of integer arithmetic.

      - Mark Thompson
      HealthPartners

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

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,293
Replies
34,435
Topic Tags
286
Empty Topic Tags
10