Re: Suggested method for returning a string from a C program?

Liste des GroupesRevenir à cl c  
Sujet : Re: Suggested method for returning a string from a C program?
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.c
Date : 21. Mar 2025, 02:47:12
Autres entêtes
Organisation : None to speak of
Message-ID : <8734f7rw7z.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
User-Agent : Gnus/5.13 (Gnus v5.13)
bart <bc@freeuk.com> writes:
On 21/03/2025 00:46, Kaz Kylheku wrote:
On 2025-03-20, bart <bc@freeuk.com> wrote:
On 20/03/2025 23:18, Keith Thompson wrote:
bart <bc@freeuk.com> writes:
On 20/03/2025 19:10, Keith Thompson wrote:
bart <bc@freeuk.com> writes:
[...]
stdint.h et al are just ungainly bolt-ons, not fully supported by the
language.
No, they're fully supported by the language.  They've been in the ISO
standard since 1999.
>
I don't think so. They are add-ons that could have been created in
user-code even prior to C99 (user-defined typedefs for 64 bits would
'need long long').
>
Sure, they could; see Doug Gwyn's q8, for example.
>
Isn't that what I said? However I've just looked at this 700-line header:

The first thing you said was "I don't think so", in response to a true
statement that I made.

Following that, I wrote "Sure, they could....".  I was agreeing with you
and providing an example.  Is that a problem?

[...]

I just tried to compile it; it needs an extra q8defs.h file (600 more
lines), but it fails: "CPU not recognised" (it might have a point if
this was from the 1990s!).

It is from the 1990s.  The web page was last updated in 1999.  It hasn't
been updated since then because it's no longer necessary, since
<stdint.h> is part of the language and almost universally supported.
("gcc -std=c90 -pedantic-errors" doesn't even complain about <stdint.h>;
apparently it treats it as an implementation-defined header, the kind of
thing that most C software uses.)

gcc just gives lots of errors. To me it's all an ugly lot of code
which reminds me of what system headers looked like: a messy, fragile
patchwork of #ifdef blocks.

You're complaining about how much work it is.  All that work
has been done for you by the implementers.  Decades ago.  I just
did a quick test comparing complation times for an empty program
with no #include directives and an empty program with #include
directives for <stdint.h> and <inttypes.h>.  The difference was
about 3 milliseconds.  I quite literally could not care care less.

of the core language, it would be zero lines.
This kind of argumentation is really not of good quality.
A feature requires lines of code. If those lines are not in some
satellite file like a C header, then they are elsewhere, like in the
compiler source code.
>
Doing stuff the C way requires LOTs of lines of code. Look at all
those MIN/MAX macros, the PRINT/SCAN macros; there's hundreds of them!

So what?  I don't have to read those lines of code.  All I have to read
is the standard (or some other document) that tells me how to use it.

[...]

I don't bother with LEAST/FAST types, whatever those mean. Where did
that all come from anyway? I've never seen those used.

I'd explain, but I've never known you to be grateful or even
interested when someone gives you information.  If you actually
wanted to know what they mean, you could consult the standard.

If you don't care about something (and you're not obligated to care
about anything), please don't ask about it.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

Date Sujet#  Auteur
19 Mar 25 * Suggested method for returning a string from a C program?391DFS
19 Mar 25 +* Re: Suggested method for returning a string from a C program?4Keith Thompson
19 Mar 25 i+- Re: Suggested method for returning a string from a C program?1Keith Thompson
19 Mar 25 i`* Re: Suggested method for returning a string from a C program?2DFS
19 Mar 25 i `- Re: Suggested method for returning a string from a C program?1Keith Thompson
19 Mar 25 +* Re: Suggested method for returning a string from a C program?323Tim Rentsch
19 Mar 25 i+* Re: Suggested method for returning a string from a C program?2DFS
19 Mar 25 ii`- Re: Suggested method for returning a string from a C program?1Richard Heathfield
19 Mar 25 i`* Re: Suggested method for returning a string from a C program?320DFS
19 Mar 25 i +* Re: Suggested method for returning a string from a C program?6Tim Rentsch
19 Mar 25 i i`* Re: Suggested method for returning a string from a C program?5DFS
19 Mar 25 i i +* Re: Suggested method for returning a string from a C program?3James Kuyper
19 Mar 25 i i i+- Re: Suggested method for returning a string from a C program?1Keith Thompson
19 Mar 25 i i i`- Re: Suggested method for returning a string from a C program?1DFS
19 Mar 25 i i `- Re: Suggested method for returning a string from a C program?1Tim Rentsch
19 Mar 25 i `* Re: Suggested method for returning a string from a C program?313Michael S
19 Mar 25 i  +* Re: Suggested method for returning a string from a C program?309DFS
19 Mar 25 i  i`* Re: Suggested method for returning a string from a C program?308Richard Heathfield
19 Mar 25 i  i `* Re: Suggested method for returning a string from a C program?307Michael S
19 Mar 25 i  i  +- Re: Suggested method for returning a string from a C program?1Richard Heathfield
20 Mar 25 i  i  `* Re: Suggested method for returning a string from a C program?305Tim Rentsch
20 Mar 25 i  i   `* Re: Suggested method for returning a string from a C program?304bart
20 Mar 25 i  i    +* Re: Suggested method for returning a string from a C program?298bart
20 Mar 25 i  i    i+* Re: Suggested method for returning a string from a C program?92Muttley
20 Mar 25 i  i    ii+* Re: Suggested method for returning a string from a C program?8Michael S
20 Mar 25 i  i    iii`* Re: Suggested method for returning a string from a C program?7Muttley
20 Mar 25 i  i    iii `* Re: Suggested method for returning a string from a C program?6Michael S
20 Mar 25 i  i    iii  +* Re: Suggested method for returning a string from a C program?3Muttley
23 Mar 25 i  i    iii  i`* Re: Suggested method for returning a string from a C program?2Michael S
23 Mar 25 i  i    iii  i `- Re: Suggested method for returning a string from a C program?1Tim Rentsch
20 Mar 25 i  i    iii  +- Re: Suggested method for returning a string from a C program?1Tim Rentsch
20 Mar 25 i  i    iii  `- Re: Suggested method for returning a string from a C program?1Keith Thompson
20 Mar 25 i  i    ii`* Re: Suggested method for returning a string from a C program?83bart
20 Mar 25 i  i    ii +- Re: Suggested method for returning a string from a C program?1Muttley
20 Mar 25 i  i    ii +* Re: Suggested method for returning a string from a C program?80Michael S
20 Mar 25 i  i    ii i`* Re: Suggested method for returning a string from a C program?79bart
20 Mar 25 i  i    ii i +* Re: Suggested method for returning a string from a C program?3Kaz Kylheku
20 Mar 25 i  i    ii i i`* Re: Suggested method for returning a string from a C program?2Michael S
20 Mar 25 i  i    ii i i `- Re: Suggested method for returning a string from a C program?1Kaz Kylheku
21 Mar 25 i  i    ii i `* Re: Suggested method for returning a string from a C program?75Keith Thompson
24 Mar 25 i  i    ii i  `* The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)74Janis Papanagnou
24 Mar 25 i  i    ii i   `* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)73Keith Thompson
25 Mar 25 i  i    ii i    `* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)72David Brown
25 Mar 25 i  i    ii i     +* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)5Kaz Kylheku
25 Mar 25 i  i    ii i     i`* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)4David Brown
25 Mar 25 i  i    ii i     i `* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)3Keith Thompson
26 Mar 25 i  i    ii i     i  +- Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)1Chris M. Thomasson
26 Mar 25 i  i    ii i     i  `- Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)1David Brown
25 Mar 25 i  i    ii i     +* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)64Janis Papanagnou
25 Mar 25 i  i    ii i     i+* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)54bart
25 Mar 25 i  i    ii i     ii`* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)53Janis Papanagnou
26 Mar 25 i  i    ii i     ii +* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)2bart
26 Mar 25 i  i    ii i     ii i`- Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)1Janis Papanagnou
26 Mar 25 i  i    ii i     ii `* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)50David Brown
26 Mar 25 i  i    ii i     ii  `* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)49Janis Papanagnou
26 Mar 25 i  i    ii i     ii   `* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)48David Brown
26 Mar 25 i  i    ii i     ii    `* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)47Janis Papanagnou
26 Mar 25 i  i    ii i     ii     +- Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)1David Brown
27 Mar 25 i  i    ii i     ii     `* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)45bart
27 Mar 25 i  i    ii i     ii      +- Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)1bart
27 Mar 25 i  i    ii i     ii      +* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)4Waldek Hebisch
27 Mar 25 i  i    ii i     ii      i`* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)3bart
27 Mar 25 i  i    ii i     ii      i +- Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)1David Brown
28 Mar 25 i  i    ii i     ii      i `- Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)1Waldek Hebisch
27 Mar 25 i  i    ii i     ii      `* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)39Janis Papanagnou
27 Mar 25 i  i    ii i     ii       +* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)13bart
28 Mar 25 i  i    ii i     ii       i`* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)12Janis Papanagnou
28 Mar 25 i  i    ii i     ii       i +* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)9David Brown
28 Mar 25 i  i    ii i     ii       i i+* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)7Janis Papanagnou
28 Mar 25 i  i    ii i     ii       i ii+* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)2Michael S
28 Mar 25 i  i    ii i     ii       i iii`- Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)1Janis Papanagnou
28 Mar 25 i  i    ii i     ii       i ii+* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)2bart
28 Mar 25 i  i    ii i     ii       i iii`- Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)1Janis Papanagnou
28 Mar 25 i  i    ii i     ii       i ii`* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)2David Brown
28 Mar 25 i  i    ii i     ii       i ii `- Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)1Janis Papanagnou
28 Mar 25 i  i    ii i     ii       i i`- Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)1Chris M. Thomasson
28 Mar 25 i  i    ii i     ii       i +- Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)1bart
31 Mar 25 i  i    ii i     ii       i `- [OT] PC hardware prices [correction] (was Re: The integral type 'byte')1Janis Papanagnou
27 Mar 25 i  i    ii i     ii       `* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)25David Brown
28 Mar 25 i  i    ii i     ii        `* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)24Janis Papanagnou
28 Mar 25 i  i    ii i     ii         +* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)18Chris M. Thomasson
28 Mar 25 i  i    ii i     ii         i`* [OT] SPARC (was Re: The integral type 'byte')17Janis Papanagnou
28 Mar 25 i  i    ii i     ii         i +- Re: [OT] SPARC (was Re: The integral type 'byte')1Keith Thompson
28 Mar 25 i  i    ii i     ii         i +* Re: [OT] SPARC (was Re: The integral type 'byte')14Michael S
28 Mar 25 i  i    ii i     ii         i i+* Re: [OT] SPARC (was Re: The integral type 'byte')8David Brown
28 Mar 25 i  i    ii i     ii         i ii+* Re: [OT] SPARC (was Re: The integral type 'byte')6Michael S
28 Mar 25 i  i    ii i     ii         i iii`* Re: [OT] SPARC (was Re: The integral type 'byte')5David Brown
28 Mar 25 i  i    ii i     ii         i iii +* Re: [OT] SPARC (was Re: The integral type 'byte')3Chris M. Thomasson
28 Mar 25 i  i    ii i     ii         i iii i+- Re: [OT] SPARC (was Re: The integral type 'byte')1Chris M. Thomasson
28 Mar 25 i  i    ii i     ii         i iii i`- Re: [OT] SPARC (was Re: The integral type 'byte')1Kaz Kylheku
28 Mar 25 i  i    ii i     ii         i iii `- Re: [OT] SPARC (was Re: The integral type 'byte')1Kaz Kylheku
28 Mar 25 i  i    ii i     ii         i ii`- Re: [OT] SPARC (was Re: The integral type 'byte')1Kaz Kylheku
28 Mar 25 i  i    ii i     ii         i i`* Re: [OT] SPARC (was Re: The integral type 'byte')5Janis Papanagnou
28 Mar 25 i  i    ii i     ii         i i `* Re: [OT] SPARC (was Re: The integral type 'byte')4Michael S
28 Mar 25 i  i    ii i     ii         i i  +* Re: [OT] SPARC (was Re: The integral type 'byte')2Janis Papanagnou
28 Mar 25 i  i    ii i     ii         i i  i`- Re: [OT] SPARC (was Re: The integral type 'byte')1David Brown
28 Mar 25 i  i    ii i     ii         i i  `- Re: [OT] SPARC (was Re: The integral type 'byte')1Kaz Kylheku
28 Mar 25 i  i    ii i     ii         i `- Re: [OT] SPARC (was Re: The integral type 'byte')1Chris M. Thomasson
28 Mar 25 i  i    ii i     ii         `* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)5David Brown
28 Mar 25 i  i    ii i     ii          +- Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)1Michael S
28 Mar 25 i  i    ii i     ii          +* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)2bart
28 Mar 25 i  i    ii i     ii          `- Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)1Janis Papanagnou
26 Mar 25 i  i    ii i     i`* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)9David Brown
25 Mar 25 i  i    ii i     `* Re: The integral type 'byte' (was Re: Suggested method for returning a string from a C program?)2Keith Thompson
20 Mar 25 i  i    ii `- Re: Suggested method for returning a string from a C program?1Keith Thompson
20 Mar 25 i  i    i+* Re: Suggested method for returning a string from a C program?93bart
20 Mar 25 i  i    i+* Re: Suggested method for returning a string from a C program?90Keith Thompson
21 Mar 25 i  i    i`* Re: Suggested method for returning a string from a C program?22Waldek Hebisch
20 Mar 25 i  i    +- Re: Suggested method for returning a string from a C program?1Michael S
20 Mar 25 i  i    +- Re: Suggested method for returning a string from a C program?1Muttley
20 Mar 25 i  i    +- Re: Suggested method for returning a string from a C program?1Kaz Kylheku
20 Mar 25 i  i    +- Re: Suggested method for returning a string from a C program?1Tim Rentsch
20 Mar 25 i  i    `- Re: Suggested method for returning a string from a C program?1Keith Thompson
19 Mar 25 i  `* Re: Suggested method for returning a string from a C program?3Tim Rentsch
19 Mar 25 +* Re: Suggested method for returning a string from a C program?27Keith Thompson
19 Mar 25 +* Re: Suggested method for returning a string from a C program?9Ike Naar
19 Mar 25 +* Re: Suggested method for returning a string from a C program?19bart
19 Mar 25 +* Re: Suggested method for returning a string from a C program?6Michael S
22 Mar 25 `* Re: Suggested method for returning a string from a C program?2Lynn McGuire

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal