Mail Archives: cygwin/1998/04/21/07:07:58
On 19-Apr-1998, Richard H. Gumpertz <rhg AT cps DOT com> wrote:
> Christopher Lee <leec AT mag DOT com>:
> > I'm having trouble on gnu-win32-b19.1 with the printf/sprintf functions.
> > Basically, positional parameters don't seem to be working:
....
> > printf("<%1$s> <%2$s> <%3$s> <%4$s>\n","one","two","three","four");
....
> > Any way to fix this? e.g. to replace printf/sprintf in B19.1 with ANSI
> > versions?
>
> What is the '$' in your control strings? I've never seen that in printf
> control strings. Is that the source of your problem? Is it some sort of
> local extension?
`$' for positional paramters in printf() format strings is not part of
the ANSI C standard, and if I recall correctly, it is not supported by
POSIX either. It is however part of the X/Open standard, I think.
--
Fergus Henderson <fjh AT cs DOT mu DOT oz DOT au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh AT 128 DOT 250 DOT 37 DOT 3 | -- the last words of T. S. Garp.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -