bug-bash
[Top][All Lists]
Advanced

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

Re: EPOCHREALTIME


From: Chet Ramey
Subject: Re: EPOCHREALTIME
Date: Thu, 19 Aug 2021 10:30:39 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 8/19/21 9:41 AM, Léa Gris wrote:

> This will fail because of questionable design decision of having a mutable
> argument format:
> 
> LC_NUMERIC=fr_FR@UTF-8; printf 'Pi: %2.4f\n` "$(bc -l <<<'4*a(1)')"
> 
> Note how the format indicator still use a dot, but the argument format's
> decimal separator is that of the system's locale.

That's not a decimal point. The `2.4' is not some sort of decimal or
floating point number. The dot just separates the field width from the
precision.

If the argument is, in fact, a floating point number with a radix
character, the radix character is appropriately locale-dependent.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]