Liste des Groupes | Revenir à cl c |
On Fri, 24 May 2024 06:54:35 -0700
Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
>Michael S <already5chosen@yahoo.com> writes:>
>On Thu, 23 May 2024 17:37:39 -0700>
Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
>Michael S <already5chosen@yahoo.com> writes:>
>[...] Just want to say that strfrom* family is long overdue, but>
still appear incomplete. The guiding principle should be that all
format specifiers available in printf() with sole exception of %s
should be provided as strfrom* as well.
What's the motivation for having separate functions? To me this
looks like creeping featuritis.
My practical motivation is space-constrained environments, where I
possibly want one or two or three formatters. sprintf() gives me
all or nothing and all can be too expensive. Many embedded
environments have big and small variants of sprintf that can be
chosen at link time, but what's in small variant does not
necessarily match a set that I want in my specific project. And is
not necessarily well documented.
Okay, I see now where you're coming from, although I'm not sure that
the strfrom*() functions will give you what you want (in terms of
memory footprint, etc). But I get your motivation.
>
Question: which of the four formats (%A, %E, %F, %G) are ones you
expect to use?
Rarely: any of those, mostly for debugging.
In productioon code: %e is most likely, but %f could happen.
But it's not just a floating point. "Small" variants of sprintf()
on 32-bit platforms often unable to handle %lld and %llu.
Also I'm curious: do all of your target platforms>
use IEEE floating point, or do some use other representations?
Currently, only IEEE. [...]
Les messages affichés proviennent d'usenet.