cscanf

Scans input from the application screen under format control.

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

Syntax

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

Parameters

format

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

...

(IN) Points to where the converted string is to be stored. The number of arguments is determined by the format string.

Return Values

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

Remarks

Following the format string is a list of addresses to receive values.

The cscanf function is a hard-wired console function. Even if stdin is redirected, the input to this function still comes 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