lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On 6-Jul-07, at 7:53 PM, Martin Schröder wrote:

007/7/7, Mark Edgar <>:
So, POSIX (and other C implementations) have an extension to printf()
format specifiers allowing them to specify an argument by its
position.  So, you can use:

Do you have a source for that claim?

SUSV doesn't have it:

It's the sixth paragraph in that link you pasted:

[XSI] Conversions can be applied to the nth argument after the format in the argument list, rather than to the next unused argument. In this case, the conversion specifier character % (see below) is replaced by the sequence "%n$", where n is a decimal integer in the range [1,{NL_ARGMAX}], giving the position of the argument in the argument list. This feature provides for the definition of format strings that select arguments in an order appropriate to specific languages (see the EXAMPLES section).

(With some more material following.)