ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Queue, stack, list and array functions / Array functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Returns an array corresponding to the intersection 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 version 2024
PHP This function is now available for WEBDEV websites in PHP.
Example
// Premier tableau d'entiers 
tabMonTableau1 is array of int
tabMonTableau1.Ajoute(1)
tabMonTableau1.Ajoute(2)
tabMonTableau1.Ajoute(1)
tabMonTableau1.Ajoute(3)

// Second tableau d'entiers
tabMonTableau2 is array of int
tabMonTableau2.Ajoute(3)
tabMonTableau2.Ajoute(5)
tabMonTableau2.Ajoute(8)
tabMonTableau2.Ajoute(1)

// Tableau de l'intersection
tabMonIntersection is array of int
tabMonIntersection = tabMonTableau1.Intersection(tabMonTableau2)
// le résultat est 3;1
Syntax
<Result> = <First WLanguage array>.Intersect(<Second WLanguage array>)
<Result>: Array
Array variable that contains the result of the intersection.
<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
Caution:
  • 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.


Sequence of functions
You can use array functions in a sequence.
The following functions can be used in a sequence: This sequence can be used as a source for a FOR ALL statement or it can end with one of the following functions:
Example:
gnMean = garrUser.Filter(cbFilter).Map(cbMap).Mean()
Business / UI classification: Business Logic
Component: wd290vm.dll
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 11/21/2023

Send a report | Local help