|
<Array variable>.DeleteDuplicate (Function) In french: <Variable Tableau>.SupprimeDoublon
arrMyArray is array of int = [ 1, 2, 3, 1, 4, 5, 2, 6 ] // arrMyArray contains [ 1, 2, 3, 1, 4, 5, 2, 6 ] arrMyArray.DeleteDuplicate() // arrMyArray contains [ 1, 2, 3, 4, 5, 6 ]
// Use with an array of structures StACategory is Structure CODE_CATEGORY is string(5) CATEGORY is string(300) END arrTheCategories is array of StACategory // Code for filling the array ... // Delete the duplicates arrTheCategories.DeleteDuplicate(asMember, "CODE_CATEGORY;CATEGORY")
Syntax
Deleting the duplicates from a one-dimensional array of simple elements Hide the details
<WLanguage array>.DeleteDuplicate([<Deletion options>])
<WLanguage array>: Array Name of Array variable to use. This array must be a one-dimensional array. This array can also correspond to an array of simple elements of an advanced variable ("Group" array in the gglContact variables for example). <Deletion options>: Optional integer constant Deletion options corresponding to one or more constants: | | tccIgnoreAccent | Delete the duplicates while ignoring the accented characters. This option is useful for the arrays of character strings.
| tccIgnoreCase | Delete the duplicates while ignoring the case. This option is useful for the arrays of character strings. | tccIgnoreSpace | Delete the duplicates while ignoring the space characters found at the beginning and at the end of strings. This option is useful for the arrays of character strings. | Versions 20 and latertccIgnoreInsideSpace New in version 20tccIgnoreInsideSpace tccIgnoreInsideSpace | Delete the duplicates while ignoring the space characters found inside the strings. This option is useful for the arrays of character strings. | tccIgnorePonctuationAndSpace | Delete the duplicates while ignoring the space characters and the punctuation characters. This option is useful for the arrays of character strings.
|
Deleting the duplicates from a two-dimensional array of simple elements according to one or more columns Hide the details
<WLanguage array>.DeleteDuplicate(<asColumn> , <Column>)
<WLanguage array>: Array Name of Array variable to use. This array must be a two-dimensional array.This array can also correspond to a two-dimensional array of an advanced type (for example, deleting duplicates from an xlsDocument variable according to the column value). <asColumn>: Constant asColumn: Constant used to handle a two-dimensional array of simple elements according to several columns. <Column>: Integer or character string - If a single column must be taken into account, subscript of the column that must be taken into account for the deletion of duplicates.
- If several columns must be taken into account, list of columns that must be taken into account for the deletion of duplicates. The different columns must be separated by a semicolon.
Deleting the duplicates from a one-dimensional array of classes, structures or advanced types Hide the details
<WLanguage array>.DeleteDuplicate(<asMember> , <Members>)
<WLanguage array>: Array Name of Array variable to use. This array must be a one-dimensional array. This array can be an array of classes, structures or advanced types. <asMember>: Constant asMember: Constant used to handle a one-dimensional array of classes, structures or advanced types. <Members>: Character string Name of members used. If the deletion of duplicates is performed according to the value of several members, their names must be separated by semicolons.
Deleting the duplicates from a one-dimensional array with a sort procedure Hide the details
<WLanguage array>.DeleteDuplicate(<asFunction> , <Custom WLanguage procedure>)
<WLanguage array>: Array Name of Array variable to use. This array must be a one-dimensional array. This array can be an array of advanced types. <asFunction>: Constant asFunction: Constant used to handle a one-dimensional array with a sort procedure. <Custom WLanguage procedure>: Character string (with or without quotes) WLanguage procedure in the following format:
PROCEDURE <Procedure name>(<Element1>, <Element2>)
This procedure is automatically called by the deletion mechanism to compare the elements between themselves, two by two. - If the element 1 must be found before the element 2 in the sort order, the procedure must return -1.
- If the element 1 must be found after the element 2 in the sort order, the procedure must return 1.
- If the element 1 and the element 2 are identical, the procedure must return 0.
Remarks - This function is not available for the fixed arrays.
- This function can be used on the arrays of advanced variables.
- Dynamic array of variants: Only a custom deletion (with a WLanguage procedure) can be used.
This page is also available for…
|
|
|
| |
| Click [Add] to post a comment |
|
| |
|
| |
| |
| |
| |
| |
| |
| | |
| |