Performs a printf command on a window using the specified format control string.
#include <curses.h>
printw( Format, [ Argument ...])
char *Format, *Argument;
wprintw( Window, Format, [Argument ...])
WINDOW *Window;
char *Format, *Argument;
mvprintw( Line, Column, Format, [Argument ...])
int Line, Column;
char *Format, *Argument;
mvwprintw(Window, Line, Column, Format, [Argument ...]) WINDOW *Window; int Line, Column; char *Format, *Argument;
The printw, wprintw, mvprintw, and mvwprintw subroutines perform output on a window by using the specified format control string. However, the waddch (addch, mvaddch, mvwaddch, or waddch Subroutine) subroutine is used to output characters in a given window instead of invoking the printf subroutine. The mvprintw and mvwprintw subroutines move the logical cursor before performing the output.
Use the printw and mvprintw subroutines on the stdscr and the wprintw and mvwprintw subroutines on user-defined windows.
Note: The maximum length of the format control string after expansion is 512 bytes.
Argument | Specifies the item to print. See the printf subroutine for more details. |
Column | Specifies the horizontal position to move the cursor to before printing. |
Format | Specifies the format for printing the Argument parameter. See the printf subroutine. |
Line | Specifies the vertical position to move the cursor to before printing. |
Window | Specifies the window to print into. |
int x, y; printw("%d%d", x, y);
int x, y; WINDOW *my_window; wprintw(my_window, "%d%d", x, y);
int x, y; mvprintw(5, 10, "%d%d", x, y);
int x, y; WINDOW *my_window; mvwprintw(my_window, 5, 10, "%d%d", x, y);
These subroutines are part of Base Operating System (BOS) Runtime.
The waddch (addch, mvaddch, mvwaddch, or waddch Subroutine) subroutine, printf subroutine.
The printf command.
Curses Overview for Programming, List of Curses Subroutines, Manipulating Characters with Curses in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.