Delphi Measurement Conversion with Composite Units

One of the things we need for the upcoming v9 of our ESBUnitConv Pro is the ability to convert from (and to) Composite Units – like Feet and Inches.

We are also using v9 of ESBUnitConv Pro (and the other next generation of Calculators) as a testing ground for ESBDevLib for VCL – and ESBDevLib for FMX for the Mac and iOS versions of Calculators.

So our Conversion Component (and thus the associated classes) now have the ability to handle specific Composite Classes together with the needed string parsing, thus allowing heaps of flexibility in input. The following is converting Feet/Inches into Metres:



In the above “From” you could enter 5.5, 5’6″, 5 ft 6 in, 66in, etc and it will display as above on exit and properly convert.

Rather than allowing any combination, as I really don’t want to see “5 metres 4 inches” being used, we are “fixing” what Composite Conversions we are adding – and of course we can add more as we go along.

So currently we are aiming for:

  •  Distance – Feet / Inches
  • Mass – Pounds / Ounces
  • Mass – Stones / Pounds
  • Angles – Degrees / Minutes
  • Angles – Degrees / Minutes / Seconds
  • Time – Hours / Minutes
  • Time – Hours / Minutes / Seconds
  • Time – Days / Hours / Minutes / Seconds
  • Time – Minutes / Seconds

So if you can think of any others that are regularly use please let me know 🙂


About esbglenn

Software Developer working at our Family owned business, ESB Consultancy, which is located in Kalgoorlie-Boulder, in the Eastern Goldfields of Western Australia.
This entry was posted in Beta Development and tagged , , , , . Bookmark the permalink.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.