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
Allows:
  • move a row in a two-dimensional array or in an advanced array property. The other array rows are moved accordingly.
  • swap two rows in a two-dimensional array or in an advanced array property.
Note: This function is equivalent to MoveLine.
Example
MonTableau is array of 5 by 2 strings
MonTableau[1,1] = "A"
MonTableau[1,2] = "a"
MonTableau[2,1] = "B"
MonTableau[2,2] = "b"
MonTableau[3,1] = "C"
MonTableau[3,2] = "c"
MonTableau[4,1] = "D"
MonTableau[4,2] = "d"
MonTableau[5,1] = "E"
MonTableau[5,2] = "e"
// Déplacer la ligne 2 à la 4° position
ArrayMoveLine(MonTableau, 2, 4)
// Le tableau contient les éléments :
// "A", "a"
// "C", "c"
// "D", "d"
// "B", "b"
// "E", "e"
MonTableau is array of 5 by 2 strings
MonTableau[1,1] = "A"
MonTableau[1,2] = "a"
MonTableau[2,1] = "B"
MonTableau[2,2] = "b"
MonTableau[3,1] = "C"
MonTableau[3,2] = "c"
MonTableau[4,1] = "D"
MonTableau[4,2] = "d"
MonTableau[5,1] = "E"
MonTableau[5,2] = "e"
// Échanger la ligne 2 avec la ligne 4 
ArrayMoveLine(MonTableau, 2, 4, amSwap)
// Le tableau contient les éléments :
// "A", "a"
// "D", "d"
// "C", "c"
// "B", "b"
// "E", "e"
Syntax

Moving a row in a WLanguage array or in an advanced array property Hide the details

ArrayMoveLine(<WLanguage array> , <Start index> , <End index> [, <amMove>])
<WLanguage array>: Array
Name of the Array variable to use. This array must be a two-dimensional array.
<Start index>: Integer
Index of the row to move.
<End index>: Integer
New index of the row that was moved.
<amMove>: Optional constant
tdDéplace: Constant used to move a row in an array.

Swapping two rows in a WLanguage array or in an advanced array property Hide the details

ArrayMoveLine(<WLanguage array> , <Index of 1st row> , <Index of 2nd row> , <amSwap>)
<WLanguage array>: Array
Name of the Array variable to use. This array must be a two-dimensional array.
<Index of 1st row>: Integer
Index of the first row to swap.
<Index of 2nd row>: Integer
Index of the second row to swap.
<amSwap>: Constant
tdEchange Constant for exchanging two rows in an array.
Component: wd300vm.dll
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help