Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <stdio.h>
    #include <stdarg.h>
    int vsscanf( const char *in_string,
                 const char *format,
                 va_list arg );
    int vswscanf( const wchar_t *in_string,
                  const wchar_t *format,
                  va_list arg );

Description:
    The vsscanf function scans input from the string designated by in_string
    under control of the argument format.  The format string is described
    under the description of the  scanf function.

    The vsscanf function is equivalent to the  sscanf function, with a
    variable argument list replaced with arg, which has been initialized
    using the  va_start macro.

    The vswscanf function is identical to vsscanf except that it accepts a
    wide-character string argument for format.

Returns:
    The vsscanf function returns  EOF when the scanning is terminated by
    reaching the end of the input string.  Otherwise, the number of input
    arguments for which values were successfully scanned and stored is
    returned.

Example:
    #include <stdio.h>
    #include <stdarg.h>

    void sfind( char *string, char *format, ... )
      {
        va_list arglist;

        va_start( arglist, format );
        vsscanf( string, format, arglist );
        va_end( arglist );
      }

    void main()
      {
        int day, year;
        char weekday[10], month[12];

        sfind( "Saturday April 18 1987",
                "%s %s %d %d",
                weekday, month, &day, &year );
        printf( "\n%s, %s %d, %d\n",
                weekday, month, day, year );
      }

Classification:
    WATCOM

Systems:
     vsscanf - All, Netware

    vswscanf - All

See Also:
    cscanf, fscanf, scanf, sscanf, va_arg, va_end, va_start, vcscanf,
    vfscanf, vscanf

See Also: cscanf va_arg

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson