IMSL C Math Library
page
Sets or retrieves the page width or length.
Synopsis
#include <imsl.h>
void imsl_page (Imsl_page_options option, int *page_attribute)
Required Arguments
imsl_page_options option (Input)
Option giving which page attribute is to be set or retrieved. The possible values are:
option
Description
IMSL_SET_PAGE_WIDTH
Set the page width.
IMSL_GET_PAGE_WIDTH
Retrieve the page width.
IMSL_SET_PAGE_LENGTH
Set the page length.
IMSL_GET_PAGE_LENGTH
Retrieve the page length.
int *page_attribute (Input, if the attribute is set; Output, otherwise)
The value of the page attribute to be set or retrieved. The page width is the number of characters per line of output (default 78), and the page length is the number of lines of output per page (default 60). Ten or more characters per line and 10 or more lines per page are required.
Example
The following example illustrates the use of imsl_page to set the page width to 40 characters. The IMSL function imsl_f_write_matrix is then used to print a 3 × 4 matrix A, where aij = i + j10.
 
#include <imsl.h>
 
#define NRA 3
#define NCA 4
 
int main()
{
int i, j, page_attribute;
float a[NRA][NCA];
 
for (i = 0; i < NRA; i++) {
for (j = 0; j < NCA; j++) {
a[i][j] = (i+1) + (j+1)/10.0;
}
}
page_attribute = 40;
imsl_page(IMSL_SET_PAGE_WIDTH, &page_attribute);
imsl_f_write_matrix("a", NRA, NCA, (float *)a, 0);
}
Output
 
a
1 2 3
1 1.1 1.2 1.3
2 2.1 2.2 2.3
3 3.1 3.2 3.3
 
4
1 1.4
2 2.4
3 3.4