cobaddstrc

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 cobaddstrc (const cobchar_t *cstr);

Parameters:

cstr The required string.

Comments:

The specified string of characters cstr is displayed with the default attribute (A_NORMAL), 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.

cstr cannot contain more than 255 characters.

This routine returns 0 on success.

Equivalent COBOL Syntax:

call "CBL_WRITE_SCR_CHARS" using ...

or

display cstr at yyxx

Example:

To display the string "Hello World" followed by a new line, use:

cobaddstrc("Hello World\n");