Liste des Groupes | Revenir à cl c |
On 04/04/2025 04:01, Lawrence D'Oliveiro wrote:On Wed, 2 Apr 2025 16:33:46 +0100, bart wrote:
Here, tell me at a glance the magnitude of
this number:
>
10000000000
#define THOUSAND 1000
#define MILLION (THOUSAND * THOUSAND)
#define BILLION (THOUSAND * MILLION)
uint64 num = 10 * BILLION;
Much easier to figure out, don’t you think?
Try 20 * BILLION; it will overflow if not careful.
I'd normally write '20 billion' outside of C, since I use such
numbers, with lots of zeros, constantly when writing test code.
But when it isn't all zeros, or the base isn't 10, then numeric
separators are better.
Les messages affichés proviennent d'usenet.