Subject: scanf "%n" format specifier is not supported
From: [email-masked] (Alexander Chernov)

22 Jun 1998 12:36:05 -0700
Message-ID: <Pine.GSO.3.96.980622162749.14664D-100000.cygnus.gnu-win32@sigma>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: [email-masked]

Hello,

This looks like a missing feature: "%n" format specifier in sscanf
is not supported. For example, the following piece of code
left variable n value as 0 instead of 2. According to my textbooks
ANSI C specifies %n specifier.

#include <stdio.h>
#include <string.h>

  int
main()
{
  int v = 0, n = 0, r = 0;

  r = sscanf("32", "%d %n", &v, &n);
  printf("v = %d\nn = %d\nr = %d\n", v, n, d);
  return 0;
}

Regards,
Alexander

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".