Function EN Version 5.00

@WriteBuffer

System

Syntax

@WriteBuffer(BUFFERHANDLE1;VAR2);
@WriteBuffer(BUFFERHANDLE1;VAR2;FNOTIONS3);

Description

Writes the contents of a variable from the current position; see @GetPosBuffer/@SetPosBuffer, to the BINBUFFER identified by BUFFERHANDLE BUFFERHANDLE1.

Currently, the following data types are supported for VAR2:
TEXT
TEXTLIST
FN
FNLIST
TD
TDLIST
HUGETEXTLIST
RICHTEXT

FN FNOPTIONS3:
For the data types TEXT/TEXTLIST/HUGETEXTLIST/RICHTEXT for VAR2:
0 None (default)
1 The contents of the variable are converted to the ISO88591 character set.

If VAR2 has the data type FN/FNLIST, FNOPTIONS3 is interpreted as specifying the binary numeric type to be written:
1 BYTE
2 WORD
4 DWORD
8 double

If 32767 is added to these values, the number of elements at the beginning of a list is not written.

Example: @WriteBuffer(BUFFERHANDLE1;VAR2)

BinBuffer:=@CreateBuffer(100);
@WriteBuffer(BinBuffer;"Test Text \X0D\X0A");
@SetPosBuffer(BinBuffer;0;"S");
ReadBin:=@ReadBuffer(BinBuffer;"B";12);
@LogReport(ReadBin;11);
BinBuffer:=@DestroyBuffer(BinBuffer);

Creates a BINBUFFER with 100 bytes and writes the text "Test Text " followed by CR/LF to this BINBUFFERRT).
The data is then output to the APILOG, and the BINBUFFER is destroyed again.

Note : This text was machine-translated and may contain inaccuracies.