Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Even more problems with lcc-win Date: Sun, 23 Apr 2017 16:31:31 -0700 Organization: None to speak of Lines: 34 Message-ID: References: <5f2dnZm7l7YU8UTFnZ2dnUU7-X3NnZ2d@posted.internetamerica> <18c5460e-d14a-4989-a03a-fb3317d7038b@googlegroups.com> <90fc9bf0-4d59-4908-baef-eca0b670b603@googlegroups.com> <4de6ee87-6707-4f61-942a-d0cb1f19eaa8@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="b06baaefdd2d8c25f7a310fe1662b016"; logging-data="29722"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+mG+dXpaodh/J9tANln6Kb" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:tHLzPUANOoDg96QGZQuvDbW76/c= sha1:Zb7sXFRtH3fCuxGuK7g+vn4NCL4= Xref: csiph.com comp.lang.c:108378 supercat@casperkitty.com writes: > On Friday, April 21, 2017 at 6:44:54 PM UTC-5, robert...@yahoo.com wrote: >> I don't really see that as a common case: usually you'd use this sort >> of thing for internationalization, and then you'd not usually code a >> printf with any unneeded parameters. Why would the (say) French >> version of a message omit one of the data items in the message? I can >> see a handful of use cases, but not many. > > Normal printf would allow something like: > > printf(format, hours, minutes, seconds, tenths, hundredths); > > to output a time with a selectable degree of precision by changing the > format string. I can't think of many situations which would benefit > from the ability to permute arguments that wouldn't benefit more from the > additional ability to suppress them. I can. I think the most common use for the POSIX positional extensions is for localization. The format string is selected depending on the current language, with the ability to show arguments in different orders depending on the language syntax. That's a very common requirement. I don't think I've ever encountered a case where suppressing some items would be useful. But if you think it's useful, I encourage you to implement it so there's something to cite as existing practice. [...] -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"