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 without duplicates.
The following arrays can be handled:
  • One-dimensional array of simple elements (int, real, string).
  • One-dimensional array of structures. Duplicates are deleted according to the value of one or more members.
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, 2)
ArrayAdd(tabMonTableau1, 1)
ArrayAdd(tabMonTableau1, 3)

// Tableau "distinct"
tabMonDistinct is array of int
tabMonDistinct = ArrayDistinct(tabMonTableau1)
// le résultat est 1; 2; 3
Syntax
<Result> = ArrayDistinct(<WLanguage array>)
<Result>: Array
Array variable that contains the array without duplicates.
<WLanguage array>: Array
Name of the Array variable to use. This array must be a one-dimensional array.
Remarks
You can also delete the duplicates in an array using ArrayDeleteDuplicate.
  • ArrayDeleteDuplicate directly manipulates the array passed as parameter.
  • ArrayDistinct does not modify the array passed as parameter and returns a new array without the duplicates.
Business / UI classification: Business Logic
Component: wd300vm.dll
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help