cobcols

Returns the number of columns on the screen.
Restriction: This function is supported for native COBOL only.

Syntax:

#include "cobscreen.h"

int cobcols (void);

Parameters:

None.

Comments:

This function returns the width in columns of the screen.

Equivalent COBOL Syntax:

call "CBL_GET_SCR_SIZE" using ...

Example:

To find out and display the width of the screen use:

int width = cobcols();
 
printf("Width of screen = %d\n", width);
int width = cobcols();
 
cobprintf("Width of screen = %d\n", width);