Sujet : Re: Suggested method for returning a string from a C program?
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.lang.cDate : 20. Mar 2025, 17:20:28
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20250320091624.937@kylheku.com>
References : 1 2 3 4 5 6 7 8 9 10
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2025-03-20, Scott Lurndal <
scott@slp53.sl.home> wrote:
Long is useless, because Microsoft made the mistake of defining
'long' as 32-bits on 64-bit architectures, while unix and linux
define it as 64-bits.
long was once useful for avoiding the predicament int is as few as
16 bits wide on some systems.
This is an almost entirely obsolete concern.
In code that assumes int >= 32 bits, but is otherwise intended
to be portable, long serves no purpose.
In comp.lang.c, we use long for anything that needs to go
beyond 32767, but not beyond 2147483647. :)
-- TXR Programming Language: http://nongnu.org/txrCygnal: Cygwin Native Application Library: http://kylheku.com/cygnalMastodon: @Kazinator@mstdn.ca