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]
else
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————–
end

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

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>