BinAdd Function

Action

Appends a string or binary data to other binary data.

Include file

Kernel.bdh

Syntax

BinAdd( inout sString : string,
        in    sAppend : string,
        in    nCount  : number optional );
Parameter Description
sString Source string. This parameter will contain the concatenated data after the BinAdd operation. The provided data (sAppend) will be appended at the end of the specified data sequence (sSstring).
sAppend String or binary data to append.
nCount Number of bytes to append (optional). Omit this parameter to append all available data.

Example

dcltrans
transaction TWeb
  var
    sData : string;
  begin

    sData := "Hugo";
    BinAdd(sData, "\h00");
    BinAdd(sData, "John");
    BinAdd(sData, "\h00");
    writedata(bin(sData));
    writedata(sData);
    StrAdd(sData, "_Smith");
    writedata(bin(sData));

  end TWeb;

Output

00000000  Hugo·John·        48 75 67 6F 00 4A 6F 68 6E 00
Hugo
Hugo_Smith