dynInsertAtConst()

The function is comparable to dynInsertAt() but will not change the source variable that is inserted.

Synopsis

int dynInsertAtConst( <dyn_type> &aDyn, [< type >| <dyn_type >] &aValue, int position);

Parameters

Parameter Description
aDyn Field into which the insertion is made
aValue Element(s) to be inserted
position Position at which the insertion is made

Return Value

The current number of field elements in aDyn, -1 in the event of an error.

Errors

A message is issued in the event of missing or incorrect arguments or incorrect variables.

Description

Inserts the element aValue in the field aDyn at the position "position". The aValue variable is not emptied after being inserted to aDyn.

Example

main()
{
  const dyn_string constDynString = makeDynString("x", "y");
  dyn_string result;
  const mapping constMapping = makeMapping("myKey", constDynString);
  dynInsertAtConst(result, constMapping["myKey"], 1);
}

Assignment

Dynamic fields

Availability

CTRL