Subject: Re: Linux's printf() extensions
To: None <firstname.lastname@example.org>
From: Christos Zoulas <email@example.com>
Date: 09/25/1998 08:58:46
In article <Pine.NEB.firstname.lastname@example.org> email@example.com (Gandhi woulda smacked you) writes:
>Can anyone illustrate to this ignorant country mouse...er, wolf,
>exactly why, when we have printf() already, we need to add the ability
>to convolute the format strings in such a hideous manner?
>I mean a practical example, here, nothing frivolous. I don't get it.
All this is for internationalization; some languages due to syntax differences
have a different word ordering. Since the format strings are different
depending on the locale, so you get something like:
printf(catgets(catalog, set_id, msg_id, "default %s format string %d"),
some languages want to match string first and num second; others the other
way around. To accomodate both the easiest way is to specify the ordering
inside the format string.