From: "Shaun" on
Hi,

I am trying to create a function that will convert metres to feet and vice
versa. After searching Google I have found that 1 meters = 3.2808399 feet.
However if someone enters 10.5 to mean 10 feet and 5 inches this is not the
same as 10 feet and half a foot as there are 12 inches in a foot!

Is there a standard conversion for this problem?
From: Gustavo Lescano on
converting feets to inches and after converting inches to cm.
Sorry fo my english

Gustavo

Shaun escribi?:
> Hi,
>
> I am trying to create a function that will convert metres to feet and vice
> versa. After searching Google I have found that 1 meters = 3.2808399 feet.
> However if someone enters 10.5 to mean 10 feet and 5 inches this is not the
> same as 10 feet and half a foot as there are 12 inches in a foot!
>
> Is there a standard conversion for this problem?
From: Alan Lord on
Shaun wrote:
> Hi,
>
> I am trying to create a function that will convert metres to feet and vice
> versa. After searching Google I have found that 1 meters = 3.2808399 feet.
> However if someone enters 10.5 to mean 10 feet and 5 inches this is not the
> same as 10 feet and half a foot as there are 12 inches in a foot!
>
> Is there a standard conversion for this problem?

Make the interface clear (perhaps have separate text boxes for metric or
imperial entry) so that they enter Feet and Inches rather than a decimal
notation, which is not common anyway. Then calculate the total inches,
multiply by 25.4 and divide by 1000.

Of course you also need to handle fractions... Most Americans I believe
(I'm English) would write 10 5/16" for example.

Hope this helps.

Alan
From: Jim Moseby on
>
> Shaun wrote:
> > Hi,
> >
> > I am trying to create a function that will convert metres
> to feet and vice
> > versa. After searching Google I have found that 1 meters =
> 3.2808399 feet.
> > However if someone enters 10.5 to mean 10 feet and 5 inches
> this is not the
> > same as 10 feet and half a foot as there are 12 inches in a foot!
> >
> > Is there a standard conversion for this problem?
>
> Make the interface clear (perhaps have separate text boxes
> for metric or
> imperial entry) so that they enter Feet and Inches rather
> than a decimal
> notation, which is not common anyway. Then calculate the
> total inches,
> multiply by 25.4 and divide by 1000.
>
> Of course you also need to handle fractions... Most Americans
> I believe
> (I'm English) would write 10 5/16" for example.


Americans would also commonly write:

10'-5 3/4"

To mean 10 feet, 5 and 3/4 inches

JM
From: Jochem Maas on
Jim Moseby wrote:
>>Shaun wrote:

I would say that requiring explicit use of the chars (')
and (") to denote imperial measurement is probably the neatest
way to go (and that you can assume that lack of these chars and
or use of the (.) entails metric data. ... assuming you have/want
a single text box for data entry ... you could consider having 2
boxes for large and small unit values combined with a dropdown
to select the measurement type (imperial/metric)

>
>
>
> Americans would also commonly write:
>
> 10'-5 3/4"
>
> To mean 10 feet, 5 and 3/4 inches
>
> JM
>