Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cscanf(DOS) — Xenix 2.3.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fscanf(S)

scanf(S)

sscanf(S)



     CSCANF(DOS)              XENIX System V               CSCANF(DOS)



     Name
          cscanf - Converts and formats console input.

     Syntax
          #include <conio.h>

          int cscanf (format[ arg... ]);
          char *format;

     Description
          The cscanf function reads data directly from the console
          into the locations given by the arguments (if any), using
          the getche function to read characters.  Each argument must
          be a pointer to a variable with a type that corresponds to a
          type specifier in the format.  The format controls the
          interpretation of the input fields and has the same form and
          function as the format argument for the scanf function.

     Return Value
          cscanf returns the number of fields that were successfully
          converted and assigned.  The return value does not include
          fields which were read but not assigned.

          The return value is EOF for an attempt to read at end-of-
          file.  A return value of 0 means that no fields were
          assigned.

     See Also
          fscanf(S), scanf(S), sscanf(S)

     Example
          #include <conio.h>

          int result; char buffer[20];
            .
            .
            .  cprintf ("Please enter file name: ");

          /* The following statement stores string input ** from the
          keyboard.  */

          result = cscanf ("%19s",buffer);

          /* Result is the number of correctly matched input **
          fields. It is zero if none could be matched.  */

     Notes
          This call must be compiled with the -dos flag.







     Page 1                                           (printed 8/7/87)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026