dynIntersect()

Returns a DynVar with each values from value, which occurs in key.

Synopsis

dyn_type dynIntersect(dyn_type key, dyn_type values);

Parameters

Parameter Meaning
key array of arbitrary data type, for example, key = {1, 1, 2, 3}
value array of arbitrary data type, for example, values = {1, 2, 2, 5, 6}

Return Value

An array with the combined data.

Errors

A message is issued in the event of missing or incorrect arguments, or if the first parameter is not an array.

Description

Returns a DynVar with each values from value, which occurs in key. key and values need not the same data type. The result (return value) always has the type from values.

Example

main()
{
  dyn_int key,value,result;
  key=makeDynInt(1,2,2,3);
  value=makeDynInt(1,2,2,5,6);
  result=dynIntersect(key, value);
  DebugN(result); // returns (1,2,2)
}

Assignment

Dynamic fields

Availability

CTRL