dynRemove()

Removes an element from a dyn variable.

Synopsis

int dynRemove ( <dyn_type> &aDyn, int element );

Parameters

Parameter Meaning
&aDyn Dynamic field.
element Index of the element to be removed (the 1st element has the index 1).

Return Value

The function returns 0 if it was successfully executed and in the event of an error -1.

Description

Removes the element with the index element from a dyn variable.

Example

Removes the word "Product" from a dyn_string via dynRemove.

main()
{
  dyn_string s = makeDynString("SCADA","Product");
  int rc = dynRemove(s, 2);
  DebugN(rc, s); //s = "SCADA"
}

Assignment

Dynamic fields

Availability

CTRL