AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de colas, pilas, listas y arrays / Funciones de arrays
  • Inserting a row
  • Inserting a row into an advanced array property
  • Miscellaneous
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Inserts a row at a given position:
  • into a two-dimensional WLanguage array.
  • into an advanced two-dimensional array property (xlsDocument, etc.).
Note: This function is identical to InsertLine.
Ejemplo
MyArray is array of 2 by 3 strings
ArrayInsertLine(MyArray, 1, "A", "B", "C")
ArrayInsertLine(MyArray, 2, "a", "b", "c")
ArrayInsertLine(MyArray, 3, "D", "E", "F")
// Display the content of the 3rd row
Trace(MyArray[3,1], MyArray[3,2], MyArray[3,3]) 
// Displays "D E F"
Sintaxis
ArrayInsertLine(<WLanguage array> , <Insertion index> [, <Element column 1> [... [, <Element column N>]]])
<WLanguage array>: Array
Name of the Array variable to use. This array must be a two-dimensional array.
<Insertion index>: Integer
Index where the row must be inserted. From this index, all rows will move by 1 position.
If <Insertion index> is equal to the number of rows in the array + 1, the row is added at the last position in the array (equivalent to ArrayAddLine).
A WLanguage error occurs if <Insertion index> is greater than the number of rows in the array + 1.
<Element column 1>: Type of array elements, optional
Element of the row that will be added into the specified array. Each element corresponds to a column in the array. The type of the added element must be compatible with the column type.
If none of these parameters is specified, an empty row is added to the array. The columns are initialized with the default value of the type of the other array elements.
If one of these parameters is not specified, the corresponding column is initialized with the default value of the type of the other array elements.
<Element column N>: Type of array elements, optional
Element of the row that will be added into the specified array. Each element corresponds to a column in the array. The type of the added element must be compatible with the column type.
If none of these parameters is specified, an empty row is added to the array. The columns are initialized with the default value of the type of the other array elements.
If one of these parameters is not specified, the corresponding column is initialized with the default value of the type of the other array elements.
Observaciones

Inserting a row

When ArrayInsertLine is called:
  • the array is automatically enlarged to receive the new row.
  • the elements are converted (if necessary) into the type of the other array elements.
Observación: Cuando se declara un array de N por M elementos, este array contiene N filas vacías. Por ejemplo, el array declarado a continuación contiene 3 filas vacías.
MyArray is array of 3 by 2 strings
Rows inserted using ArrayInsertLine are automatically inserted among the existing rows in the array.
In our example, the array will contain 4 rows once the insertion is performed.

Inserting a row into an advanced array property

When ArrayInsertLine is called:
  • the advanced variable must be created.
  • the advanced type must have an enumerator of modifiable collection type.
  • the advanced type is automatically enlarged to receive the new row.

Miscellaneous

  • This function cannot be used on:
    • non-created arrays,
    • fixed arrays.
Componente: wd300vm.dll
Versión mínima requerida
  • Versión 10
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local