Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

possible we can turn "0.5" to "1/2"

 
Nakata kokuyo
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
good day to all,

is it possible when a user enter "13.5" , then we convert it into "13 1/2" ?

thank you very much for guidance
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you code a function that does it.

Eric
 
Nakata kokuyo
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for reply Eric Pascarello ,

in function , do we replace the value .5 to 1/2 or we have special function to insert the special character "1/2" ?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65223
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, there are no special functions. This is something you'll have to come up with an alogrithm for on your own.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic