vcscanf

Scans input from the console under format control

Local Servers:blocking
Remote Servers:N/A
Classification:Other
Service:Device I/O

Syntax

  #include <stdarg.h>  
  #include <stdio.h>  
   
  int  vcscanf  (  
     const char   *format,   
     va_list       arg);
  

Parameters

format

(IN) Points to the format control string.

arg

(IN) Specifies the variable argument.

Return Values

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

Remarks

The vsscanf function scans input from the console under control of the argument format. The format list is described with the scanf function.

The vcscanf function is similar to the scanf function, with a variable argument list replaced with arg, which has been initialized using the va_start macro.

See Also

fscanf, scanf (Single and Intra-File Services), va_arg, va_end, va_start (NLM and NetWare: Program Management), vscanf (Single and Intra-File Services)

Example

  #include <stdio.h>  
  #include <stdarg.h>  
   
  void find (char *format, char *arg, ... )  
  {  
     va_list arglist;  
     va_start (arglist, arg);  
     vcscanf (format, arglist);  
     va_end (arglist );  
  }