NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/42940: units(1) parsing glitch

The following reply was made to PR bin/42940; it has been noted by GNATS.

From: David Holland <>
Subject: Re: bin/42940: units(1) parsing glitch
Date: Wed, 10 Mar 2010 14:29:18 -0500

 On Wed, Mar 10, 2010 at 12:20:05PM +0000, Robert Elz wrote:
  >  Just leave units alone in this case, nothing needs fixing except the
  >  usage expectation.   The man page shows using full names of units,
  >  any time things don't work quite like you'd hope when you use a
  >  (perhaps very common, but usually ambiguous without context) abbreviation
  >  it can always be fixed by just using the full name of the unit of concern.
 no, units should not be recognizing freestanding SI prefixes as
 dimensionless units.
 'h' is not the only one; it appears all of them that aren't also
 defined some other way exhibit this behavior.
 for example:
    You have: 1
    You want: M
           * 1e-06
           / 1000000
    You have: 1 
    You want: G
           * 1e-09
           / 1e+09
 and this is even more broken:
 You have: 1
 You want: milli
         * 1000
         / 0.001
    - David A. Holland /

Home | Main Index | Thread Index | Old Index