|
|
|
|
|
<Array>.Distinct (Function) In french: <Tableau>.Distinct 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.
arrMyArray1 is array of int
arrMyArray1.Add(1)
arrMyArray1.Add(2)
arrMyArray1.Add(1)
arrMyArray1.Add(3)
arrMyDistinct is array of int
arrMyDistinct = arrMyArray1.Distinct()
Syntax
<Result> = <WLanguage array>.Distinct()
<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 VariousYou can also delete the duplicates in an array using <Array>.DeleteDuplicate. - <Array>.DeleteDuplicate directly manipulates the array passed as parameter.
- <Array>.Distinct does not modify the array passed as parameter and returns a new array without the duplicates.
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:
gnMoyenne = gtabUser.Filtre(cbFiltre).Map(cbTransforme).Mean()
Business / UI classification: Business Logic
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|