Units and having no idea what I'm doing.

So I’m trying to make a system where things can have their length/mass/whatever be defined or displayed in both metric and imperial units. The problem is, I don’t really know what I’m doing and the documentation isn’t very helpful when it comes to teaching the weird intricacies of how the code is supposed to work.

Here’s the code:

Include Metric Units by Graham Nelson.

1 foot 11 (in imperial units, in feet) specifies a length with parts feet and inches (optional).

A thing has a mass.
A thing has a length.

There is a room called Debug Room. In Debug Room is a ruler. The length of the ruler is 1 foot. The ruler has the description “The ruler is [the length of the ruler in feet].”[/code]

I have a few key problems with this. First of all, when I examine the ruler, I get “The ruler is 88779434 foot 8” for some unholy reason. Secondly, I have no idea how to make 1 inch be equal to its equivalent in meters.

Any tips on how to fix the giant number/tie inches to meters?

The documentation for Metric Units has an example called The Empire Strikes Back that shows how to define Imperial units. I don’t think Inform syntax supports specifying a format such as “1 foot 4 inches”; you would write “16 inches” instead in your source. I recommend using Approximate Metric Units instead of the regular version of the extension, because the normal one runs into some pretty horrible floating-point handling issues in Inform.

Amazingly, it does. See §15.14.

I’ve looked at The Empire Strikes Back example, but it has nothing on how to do the format X feet Y inches sorta thing.