Buffers

Description

A number of arguments used in Client-Library functions affect the contents of buffers: ACTION, BUFFER, BUFFER_LEN, BUFBLANKSTRIP, and OUTLEN.These arguments are described individually below. For a summary of argument values and their interaction, see Table 2-1.

Arguments

Summary of buffer entries

Table 2-1 summarizes the interaction between ACTION, BUFFER, BUFFER_LEN, and OUTLEN.

Table 2-1: ACTION, BUFFER, BUFFER_LEN, and OUTLEN

For this ACTION

When BUFFER

BUFFER_LEN is

OUTLEN is

Result

CS_CLEAR

N/A

CS_UNUSED

Ignored

The property reverts to its default value.

CS_SET

Contains a variable-length character string

The length of the string

Ignored

The data in BUFFER is read by the function.

CS_SET

Contains a variable-length character string for which the terminating character is the last non-blank character

The maximum length of the string

Ignored

The application sets the value of BUFBLANKSTRIP to CS_TRUE.

The data in BUFFER is read by the function.

CS_SET

Contains a fixed-length character string or symbolic value

CS_UNUSED

Ignored

The data in BUFFER is read by the function.

CS_GET

Is large enough for the return character string

The length of the buffer

Set by Client-Library

The retrieved value is copied to the buffer.

OUTLEN returns the length of the retrieved value.

CS_GET

Is not large enough for the return character string

The length of the buffer

Set by Client-Library

No data is copied to the buffer.

OUTLEN returns the length of the value being retrieved.

The function returns CS_FAIL, indicating that you should assign the value returned here to the length argument and execute the program again.

CS_GET

Is assumed to be large enough for a fixed-length or symbolic value

CS_UNUSED

Set by Client-Library

The retrieved value is copied to the buffer.

OUTLEN returns the length of the value being retrieved.