[Previous]
[Contents]
[Next]

cprintf()

write output directly to the console

Synopsis:

#include <conio.h>
int cprintf( const char *format, ... );

Description:

The cprintf() function writes output directly to the console under control of the argument format. The putch() function is used to output characters to the console. The format string is described under the description of the printf() function.

Returns:

the number of characters written

Examples:

#include <conio.h>

void main()
  {
    char *weekday, *month;
    int day, year;

    weekday = "Saturday";
    month = "April";
    day = 18;
    year = 1987;
    cprintf( "%s, %s %d, %d\n", weekday, month, day, year );
  }

produces the output:

Saturday, April 18, 1987

Classification:

WATCOM

Safety:
Interrupt handler No
Signal handler Yes, but modifies errno
Thread Yes

See also:

_bprintf(), fprintf(), printf(), putch(), sprintf(), _vbprintf(), vcprintf(), vfprintf(), vprintf(), vsprintf()


[Previous]
[Contents]
[Next]