[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: (BUG LISP) at MIT-AI
- To: BUG-LISP at MIT-MC, BUG-LISPM at MIT-AI
- From: gjs@MIT-AI
- From: Guy Steele <GLS at SU-AI>
- Date: Tue, 20 Jun 79 16:59:30 GMT
- Date: Wed, 20 Jun 79 01:43:00 GMT
- Cc: DICK at MIT-AI
- Cc: GLS at SU-AI, RPG at SU-AI, GJS at MIT-AI
- Original-date: 06/20/79 12:59:30 EDT
- Original-date: 19 Jun 1979 1843-PDT
Let there be some new escape, say U. It gobbles two arguments;
one is a floating-point number (or is coerced to be one),
and the other is a symbol or string which is the "units" of the number,
which should be a metric word such as "meter" or "liter".
The operator scales the number to be "reasonable", then prints
the number, an appropriate metric prefix, the unit, and "s"
if that is appropriate. With the colon modifier, abbreviated
prefices are used. Example:
(format t ";~:U requires ~U" 4300.0 '|m| 0.0543 "liter")
";4.3 km requires 54.3 milliliters"
Maybe it's all pretty silly, but maybe from this someone can
invent a more useful theory.