- if allowing mix and match numbered/unumbered then stays away from
unumbered following a numbered mean the unumbered is last the numbered+1
this is tempting but wrong, i.e '%3$s %s' one would be tempted to say %s is
equiv to %4$s, but the width.prec predate that, because then one must
define what happen when index back, i.e '%4$s %s %2$s %s' what is the last
%s? some will say 3, other will say 6, in all case it will be verbose doc
to say something complicated, so my recommendation is to say non
unnumbered start at 1 and increment at each unumbered, easy to remember and
matching the case of fully unumbered and gaps are skipped over and ignored.
FreeBSD chose this interpretation, and macOS picked it up. They resolve
the ambiguity by simply rejecting unnumbered field width and precision
arguments with a numbered conversion specifier.
$ /usr/bin/printf '%3$*.*d\n' 4 2 3
printf: incomplete use of n$
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/