Path: csiph.com!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: iso646.h Date: Sun, 28 Jan 2024 15:00:55 -0800 Organization: None to speak of Lines: 28 Message-ID: <87cytl6p20.fsf@nosuchdomain.example.com> References: <87frym7l3p.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain Injection-Info: dont-email.me; posting-host="7785f266d7a579ac4bdae19d9302dff6"; logging-data="140565"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18NIUt4fHBeElxXqXr6OlWM" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:74lttYbgoSTFXUFQLNf9FwIDetM= sha1:8b1OK2TWbSuXMZOOf2QZ6ftz+QU= Xref: csiph.com comp.lang.c:381155 Janis Papanagnou writes: > On 27.01.2024 21:17, Malcolm McLean wrote: [...] >> printf() is the >> main C interface to that, and supports integers, floats and strings, to >> a first approximation. > > It's not an approximation; printf() is _restricted_ to these types (and > a few more variants of these few basic types, to be correct). printf also supports pointer values with "%p". And it support single characters, which are not strings. strings of cousre absolutely do not have to be ASCII. Using printf to print data with embedded null bytes is tricky -- but of course printf is not the only interface. We can print arbitrary data with putchar, fwrite, etc. And in environments like POSIX that don't distinguish between text and binary output streams, it can be perfectly sensible (though not 100% portable) to send binary data to stdout. [...] -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Medtronic void Void(void) { Void(); } /* The recursive call of the void */