Re: Conversion component Meter/Feet-Inch



Nils,
I note that all respondents so far has ignored the subtle complexity of your problem in that there are 2 (mathematically) trivial adjustments required and not just one. However, the problem remains simple and does not need a full component, especially as only you know whether or not you want to round up, round off, or truncate the result and whether you want to consider fractions of an inch or have a specific number of decimal places of accuracy. Assuming you know the answers to those last points, rolling your own code would be the best to keep it simple.

As you have asked the question at all, one has to assume that you are not intimately associated with the concepts of conversions using either integers (TRUNC) and fractions (FRAC), or MOD and DIV. You just need one of those pairs of functions, as you prefer, in addition to a simple multiplication.

To convert from feet and inches to metres, simply multiply the number of feet by 12, add the number of inches, and divide the result by 39.37 (or 39.3700784 for better accuracy). Round off as required. Don't use the result to build bridges!

To convert from metres to feet and inches, choose either:

a. Multiply the metres by 39.37, giving the result in inches (just inches at this stage). Round off or truncate as required to an integer. Then use DIV 12 of the integer result to give you the number of feet, and MOD 12 to give you the number of inches.

or

b. Multiply the metres by 3.28 (or 3.2808399) to give you the result in feet with decimal places. Then take the TRUNC of the result to give you integer feet and multiply the FRAC of the result by 12 to give you the number of inches as a float which should then be rounded or truncated as required for your purpose.
Regards
Allan Knox
(hoping I have not misunderstood your question and insulted your intelligence)

"Nils Boedeker" <NilsBoedeker@xxxxxxxxxxx> wrote in message news:474d4223@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi

exist an component that conversion meter to feed/inch and backwards ???

with best regards from germany

Nils Bödeker

.



Relevant Pages

  • Re: Conversion component Meter/Feet-Inch
    ... convert a feed/inch string to metres value as Double ... To convert from feet and inches to metres, simply multiply the number of feet by 12, add the number of inches, and divide the result by 39.37. ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: convert meters to feet/inches
    ... Change ROUND to TRUNC. ... If a pole vault bar is raised to 3.2 meters it equals 10' 6" like your formula produces. ... Here I'm converting the value in A1 from meters to feet using 3.2808399 feet ... the second part truncates the integer portion and convert it to inches and ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Feet and inches
    ... Enter the height (in metres): ... and convert whatever value to feet and inches. ... than 1/2 inch" in terms of your program? ...
    (comp.lang.python)
  • Re: OT - Metrication
    ... >>> Because feet and inches are miles better of course.. ... >metres or 4 metres but was priced in square yards! ... still manufactured in widths that were multiples of feet. ... to output in miles and furlongs, ...
    (uk.media.radio.archers)
  • Re: Measurement conversion
    ... This will round up the calculation if the precision of the number of feet is ... Panelstatus, CompletedDT FROM panel ... > I do not need to display the inches, just round the total footage up. ...
    (microsoft.public.sqlserver.server)

Loading