PUT_BUFFER

Concept Link IconSee also

Store data in a memory buffer.

WebVue support - Yes.

Syntax

PUT_BUFFER(Handle, Offset, Data);

There is no return type.

Argument

Meaning

Handle

The location of the memory buffer as returned by ALLOC_BUFFER or FILETOBUF. Type LONG.

Offset

The offset in bytes at which the data is to be placed. Any numeric type.

Data

The data to be put in the buffer. Type STR.

Execution

The data is stored in a memory buffer at the specified offset.

Example

SUB Main()

'Declare variables

DIM lngBuffer1 as Long;

DIM strLine as Str;

DIM intLength as Integer;

 

lngBuffer1 = ALLOC_BUFFER(110);

strLine = "123.34;string_here;345;123456789;‚t‚\n";

PUT_BUFFER(lngBuffer1, 0, strLine);

intLength = ASCIIFIELD("LEN",lngBuffer1);

PRINT("Length: ",intLength);'shows: Length: 110

FREE_BUFFER(lngBuffer1);

END SUB