|
|
|
|
<Array>.Move (Function) In french: <Tableau>.Déplace Allows you to: - move an element in a one-dimensional WLanguage array or in an advanced array property (array of gglCalendar events, etc.). The other array elements are moved accordingly.
- swap two elements in a one-dimensional WLanguage array or in an advanced array property (array of gglCalendar events, etc.).
MyArray is array of 6 strings MyArray[1] = "A" MyArray[2] = "B" MyArray[3] = "C" MyArray[4] = "D" MyArray[5] = "E" MyArray[6] = "F" // Move the element 2 to 5th position MyArray.Move(2, 5) // The array contains the following elements: "A", "C", "D", "E", "B", "F"
MyArray is array of 6 strings MyArray[1] = "A" MyArray[2] = "B" MyArray[3] = "C" MyArray[4] = "D" MyArray[5] = "E" MyArray[6] = "F" // Swap the element 2 with element 5 MyArray.Move(2, 5, amSwap) // The array contains the following elements: "A", "E", "C", "D", "B", "F"
Syntax
Moving an element in a WLanguage array or in the advanced array property Hide the details
<WLanguage array>.Move(<Start index> , <End index> [, <amMove>])
<WLanguage array>: Array Name of the Array variable to use. This array must be a one-dimensional array. <Start index>: Integer Index of the element to move. <End index>: Integer New index of the element that was moved. <amMove>: Optional constant amMove: Constant used to move an element in an array.
Swapping two elements in a WLanguage array or in the advanced array property Hide the details
<WLanguage array>.Move(<Index of 1st element> , <Index of 2nd element> , <amSwap>)
<WLanguage array>: Array Name of the Array variable to use. This array must be a one-dimensional array. <Index of 1st element>: Integer Index of the first element to swap. <Index of 2nd element>: Integer Index of the second element to swap. <amSwap>: Constant amSwap: Constant used to swap two elements in an array.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|