Lingo Function – Delete Zero in Decimals

To delete unneccessary Zero(eg. 2.000, 2.10100) after a decimal point, you can apply the following function:

on deletefloat output
——————delete float————–
repeat with k = member(output).char.count down to 1
if member(output).char[k] = “0″ then
put “” into member(output).char[k]
exit repeat
end if
end repeat
if member(output).char[member(output).char.count] = “.” then
put “” into member(output).char[member(output).char.count]
end if
——————delete float————–

The “output” is the your text member’s name. :D
Have fun!

Related Posts Plugin for WordPress, Blogger...
Suscribe Now!Subscribe to get free latest updates by email. Like Us!Like our Facebook Page.

LIKE It & Leave A Comments

Leave a Reply