To write text in a CCATSL window, CCATSL provides the function
PrintfCL.
PrintfCLPrintfCL is the analogue of the standard C library routine
printf but uses the current CCATSL window.
The routine WLinesCL
can be used to find out how many lines of text a window can hold.
| void PrintfCL ( |
int col, |
| int row, |
|
| char *format, ... ); |
|
| col, row |
The location of the start of the string, relative to the top-left
corner of the window: 1,1 is the top-left corner. |
|
| format, ... |
See printf for an explanation of the remaining arguments. |
An example of using PrintfCL is shown below. Note that because the exact
screen location of the string is specified in the first two arguments, there
is no need to append a newline character \n to the format string.
|
int i; double r; /* ... */ PrintfCL(1,1,"Iteration=%i Radius=%f",i,r); |
WLinesCL
WLinesCL returns the maximum number of text lines
viewable in the current window. This is useful in the context of the routine
PrintfCL.
|
n=WLinesCL(); |