# Rounding to the nearest unit

I am having trouble getting Inform to convert from centimeters to inches, and round at the same time. Here is what I have:

[code]Section 1 - Units

Measurement is a kind of value. The measurements are metric and imperial.

The player has a measurement called preferred unit. The preferred unit of the player is usually imperial.

Height is a kind of value. 19900 decimillimeters specifies a height. The plural of decimillimeter is decimillimeters.

1 cm (in metric units, in centimeters, plural) specifies a height scaled up by 100.

1 inches (in imperial units, in inches, plural) specifies a height scaled up by 254.

A person has a height. The height of a person is usually 170 cm.

To say height of (Bob - a person):
let H be the height of Bob;
if the preferred unit of the player is metric:
say H in metric units;
else if the preferred unit of the player is imperial:
say H in imperial units.

Section 2 - Room

Testbed is a room. The player is in Testbed. Measurement is imperial.

Anne is a woman in Testbed. The height of Anne is 170 cm. The description of Anne is “She appears to be [height of Anne] tall.”[/code]
It correctly displays metric height as “170 cm” but it displays “66.933 inches” in imperial units. How do I make it drop the decimal? (I’d prefer to display it in feet + inches, but I’m content with inches only.)

I can’t use say H in imperial units to the nearest 1 because it says “Problem. You wrote ‘say H in imperial units to the nearest 1’ , and in particular ‘H in imperial units to the nearest 1’: but this asked to say something which describes items too vaguely, and so does not (or not in an elementary enough way) tell me exactly which thing or room should have its name printed.”

This does the trick:

```To say height of (Bob - a person): let H be the height of Bob; if the preferred unit of the player is metric: say H in metric units; else if the preferred unit of the player is imperial: say H to the nearest 1 inches. ```
(as does “say H to the nearest 1 inches in imperial units”).