ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Queue, stack, list and array functions / Array functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Returns an array corresponding to the union of two arrays.
The following arrays can be handled:
  • One-dimensional array of simple elements (int, real, string).
  • One-dimensional array of structures.
New in SaaS
WEBDEV - Browser code This function is now available in browser code.
Note: This feature is only available from WINDEV Suite SaaS 2025 - Update 2.
For more details, see Using new features exclusive to WINDEV Suite SaaS 2025.
Example
// Premier tableau d'entiers
tabMonTableau1 is array of int
ArrayAdd(tabMonTableau1, 1)
ArrayAdd(tabMonTableau1, 6)
ArrayAdd(tabMonTableau1, 1)
ArrayAdd(tabMonTableau1, 3)

// Second tableau d'entiers
tabMonTableau2 is array of int
ArrayAdd(tabMonTableau2, 3)
ArrayAdd(tabMonTableau2, 5)
ArrayAdd(tabMonTableau2, 8)
ArrayAdd(tabMonTableau2, 2)

// Tableau de l'union
tabMonUnion is array of int
tabMonUnion = ArrayUnion(tabMonTableau1, tabMonTableau2)
// le résultat est 1;6;3;5;8;2
Syntax
<Result> = ArrayUnion(<First WLanguage array> , <Second WLanguage array>)
<Result>: Array
Array variable that contains the result of the union.
<First WLanguage array>: Array
Name of the Array variable that corresponds to the first array to use. This array must be a one-dimensional array. This array will not be modified.
<Second WLanguage array>: Array
Name of the Array variable that corresponds to the second array to use. This array must be a one-dimensional array. This array must be of the same type as the array specified with the <First WLanguage array> parameter. This array will not be modified.
Remarks
  • If an array contains several duplicates, these duplicates will not be kept.
  • The resulting array will not be sorted, even if the original arrays are.
Business / UI classification: Business Logic
Component: wd300obj.dll
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/28/2025

Send a report | Local help