Error getting tags :
error 404Error getting tags :
error 404 union | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
union
Basics
Expander triangle
Type
Command
Syntax
union array with testArray
Introduced
1.1
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Combines two arrays.
Examples

union monthlyPayments with quarterlyPayments

Additional Comments
Expander triangle

Use the union command to combine two arrays, eliminating duplicate elements.

Parameters:

The array is any array variable.

The testArray is any array variable.

Comments:

The union command combines the array and testArray. Each key of the array is checked to see whether there is already an element with that key in the testArray. If there is, that element of the array is unchanged. If not, the corresponding element of the testArray is placed in the array.

After the union command is executed, the keys of the array consists of the logical union of the keys of the original array and the keys of the testArray.

The content of individual elements of the testArray does not affect the final result. Only which elements exist in the testArray, not their content, controls which elements of the testArray are placed in the array. If the array and testArray have the same set of keys but different content in each element, the union command does not change the value of the array.

User Comments
Expander triangle