cobaddstr

Displays the specified string on the screen starting at the virtual cursor's current position.
Restriction: This function is supported for native COBOL only.

Syntax:

#include "cobscreen.h"

int cobaddstr (const cobchtype *str);

Parameters:

str The required string and any attributes.

Comments:

The specified string of characters and attributes str is displayed starting at the current position of the virtual cursor. If the string is longer than the remaining width of the line, it wraps when it reaches the edge of the screen.

A character of \n (new line) is a valid character, and moves the virtual cursor to the beginning of the next line. The null character \0 terminates the string. No other control characters are valid; their use causes undefined results.

str cannot contain more than 255 characters.

This routine returns 0 on success.

Equivalent COBOL Syntax:

call "CBL_WRITE_SCR_CHATTRS" using ...

Example:

To display the string "HUB" with highlighting, underline and blink attributes, use:

cobchtype s[4] = { 'H' | A_BOLD, 'U' | A_UNDER, 'B' | 
                  A_BLINK, 0 };

cobaddstr(s);