Update cookies preferences
Promotic

Remove - method of the PmBuffer object

Description:
Removes existing space from inside an existing data block and shrinks the data block.
Syntax:
Long Remove(Long nOffset, Long nRemove)
Parameters:
nOffset(Long) Specifies the position in the data block from which the existing space is removed.
>= 0 - Index (in bytes, zero-based index) in the data block.
-4 - The internal automatic position is used (see the AutoOffset property).
This operation shifts the internal automatic position to the beginning of the removal..
nRemove(Long) The size of existing space to be removed in bytes.
Return value:
Returns the number of bytes removed or 0 on error.
Note:
This method is not functional yet in Web panels.
See also:
- PmBuffer.SetSize (method)
- PmBuffer.Insert (method)
Example:
JavaScriptSelect and copy to clipboard

var b = Pm.CreatePmBuffer();
b.SetUint8(-2, 0x10);
b.SetUint8(-2, 0x20);
b.SetUint8(-2, 0x30);
b.SetUint8(-2, 0x40);
var s0 = b.GetHexaString(0);   // The result will be "10203040"
b.Remove(2, 1);
var s1 = b.GetHexaString(0);   // The result will be "102040"

History:
Pm9.00.25: Created
PROMOTIC 9.0.28 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.