On Wed, Oct 29, 2014 at 8:01 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
You mean something like this:
error(msg.x_should_lie_between_0_and_255)
Although I think the OP means in the Lua core, so it's more like
#define x_should_lie_between_0_and_25 "x should lie between 0 and 255"
Tricky to do when there's format specifiers in general.
Many countries use the day-month-year order. Hence, an internationalized version must be able to print the arguments in an
order specified by the format:
#include <stdio.h>
fprintf(stdout, format,
weekday, month, day, hour, min);
where format depends on locale, and may permute the arguments. With the value:
"%1$s, %3$d. %2$s, %4$d:%5$.2d\n"
one might obtain "Sonntag, 3. Juli, 10:02".