Quoth Eric Lowe on Tue, Oct 17, 2006 at 09:28:05AM -0500:
> NAME
>         strfnum, strfunum - format a number as a scaled string
...
>     Conversion Specification
>         The <fmt> string determines how <value> will be formatted to
>         the output in a fashion similar to sprintf(). Each conversion
>         specifier within the string consists of the % character, after
>         which the following appear in sequence:
> 
>           o Zero or more of the following modifiers:
>                 '0' : the resulting string is zero padded.
>                 '-' : the resulting string is left aligned.
>                 '+' : the resulting string's first char is a
>                       '+' if result is greater than zero.
>                 ' ' : the resulting string's first char is a
>                       space is the result is greater than zero;
>                       used only if the '+' modifier is not
>                       defined.

Can we use a consistent tense, probably by changing the "is"es to "will
be"s?

>                 '#' : suppress trailing zeroes.
>                 't' : include thousands separator(s).

Is there a reason for 't'?  Wouldn't ',' be more intuitive and "'" more
consistent with printf(3C)?

>                 'u' : suppress unit suffix.
...
>           o An optional 'b' character, which will express the result
>             as radix-2 rather than radix-10 (radix 2 uses 1024^N
>             whereas the default of radix 10 uses 1000^N to convert
>             the number).

I'm going to side with Paul here: Can we take this opportunity to
eliminate the mystery of whether a scaled number is base 10 or base 2 by
making this function automatically use the IEC binary symbols (Ki, Mi,
Gi, Ti, Pi, Ei, Zi, Yi)?


David

Reply via email to