Sujet : Re: The joy of FORTRAN
De : bowman (at) *nospam* montana.com (rbowman)
Groupes : alt.folklore.computers comp.os.linux.miscDate : 04. Mar 2025, 21:59:18
Autres entêtes
Message-ID : <m2p7t6Fi079U3@mid.individual.net>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14
User-Agent : Pan/0.160 (Toresk; )
On Tue, 04 Mar 2025 15:38:57 GMT, Scott Lurndal wrote:
Perhaps not, but snprintf can easily append to prior snprint output. No
need to do it all at once.
sprintf has been deprecated for decades.
I often use sprintf() like
char* ptr = errbuf;
ptr += sprintf(ptr, "prymed LogiOpt settings:\n");
ptr += sprintf(ptr, "\tcfslib debug : %x\n", cfslib_debug);
ptr += sprintf(ptr, "\tdata bits : %d\n", data_bits);
ptr += sprintf(ptr, "\tdebug : %x\n", debug);
...