vcscanf

Scans input from the console under format control.

Library:LibC
Classification:Other
Service:File and Directory I/O

Syntax

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

Parameters

format

(IN) Points to the format control string. See Scan Format Control Strings.

arg

(IN) Specifies the variable argument where the scanned string is to be stored. The number of arguments in the list is determined by the format string.

Return Values

Returns EOF when the scanning is terminated by reaching the end of the input stream. Otherwise, returns the number of input arguments for which values were successfully scanned and stored. When an input error occurs, errno is set.

Remarks

The vsscanf function scans input from the console under control of the argument format.

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.

The vcscanf function is a hard-wired console function. Even if stdin is redirected, vcscanf retrieves the data from the application screen. If your application does not create a screen with the SCREENNAME directive at compile time, your application can receive no input.

For more information on screen creation, see Designating an Application Screen.

See Also