Sujet : Re: Integral types and own type definitions (was Re: Suggested method for returning a string from a C program?)
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.cDate : 26. Mar 2025, 15:59:48
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vs14p5$20ejf$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 26.03.2025 12:33, David Brown wrote:
On 26/03/2025 10:59, Keith Thompson wrote:
David Brown <david.brown@hesbynett.no> writes:
[...]
Sure. But most people have forgotten such details long ago - negative
numbers are not part of daily life (except as an indicator of how much
you owe the bank...). After all, negative numbers are not natural!
>
Most people understand credits and debits.
They do. But they understand it as "I owe the bank $100" - they don't
view it as "I have -$100 in my bank account". [...]
I don't know about contemporary bookkeeping but in my youth they had
two columns with non-negative numbers for both sides, the credits and
debits. Nowadays, e.g. in online banking, we see signed numbers.
Even in C (in a desperate attempt to bring us back on topic for the
group), there are no negative integer constants - merely positive
integer constants with a unary minus operator applied.
Is that so? (Harmlessly asking.) - I mean, if I write int x = -5;
does it matter (in "C") whether its parsed as <integer number> or
<negation> <positive number> ?
I faintly recall a discussion, I think in context of exponentiation.
But I don't want to (re-)open a can of words...
Janis