jQuery in Action, 3rd edition
The moose likes HTML, CSS and JavaScript and the fly likes possible we can turn Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "possible we can turn "0.5" to "1/2"" Watch "possible we can turn "0.5" to "1/2"" New topic

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

Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 465
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

Joined: Nov 08, 2001
Posts: 15385
If you code a function that does it.

Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 465
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

Joined: Jan 10, 2002
Posts: 63852

No, there are no special functions. This is something you'll have to come up with an alogrithm for on your own.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link: http://aspose.com/file-tools
subject: possible we can turn "0.5" to "1/2"
It's not a secret anymore!