displaying numbers

    Aug 31 2013 | 6:37 pm
    often i am using lcd instead of numberboxes to display numbers. what i find annoying is that lcd displays zerois behind the last value, e.g. 82.125000.
    do you have an idea what is the best way to cut off these 0´s – avoiding regexp and itoa/atoi?

    • Sep 01 2013 | 12:12 pm
      [regexp] is probably the way to go. Otherwise, you could do some custom JScript, Java, or «gasp!» C.
      The long and the short of it is that, until lcd has an attribute allowing you to specify the formatting conventions for float-to-string, you're going to have to use some object to pre-process the float into the string (symbol) format you want.
    • Sep 01 2013 | 11:31 pm
      damn, thats what i thought.
      so i will not search für zeros, i will just split the numbers at the comma and limit the right part to three characters.