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
  • Equivalences
  • 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
Returns the characteristics of an array: type of elements, number of dimensions, dimensions, etc.
Note: This function can only be used on WLanguage arrays..
Ejemplo
// Total number of elements found in a one-dimensional array
MyArray is array of 5 int
...
nbDim is int
nbDim = MyArray.Info(tiTotalNumber)
// nbDim is equal to 5
// Array dimensions
MyArray is array of 5 by 2 int
nbRowDim is int 
nbRowDim = MyArray.Info(tiNumberRows)
// NbRowDim is equal to 5
nbColumnDim is int 
nbColumnDim = MyArray.Info(tiNumberColumns)
// NbColumnDim is equal to 2
Sintaxis
<Result> = <WLanguage array>.Info(<Type of information> [, <Additional parameter>])
<Result>: Integer or boolean
Requested information.
Note: The function returns no result on a dynamic array that has not been allocated.
<WLanguage array>: Array
Name of the Array variable to use.
<Type of information>: Integer constant
Type of information to retrieve:
tiAssociativeWithDuplicateBoolean.
  • True if the associative array supports the duplicates
  • False otherwise.
tiDimensionInteger. Number of elements found in a dimension of the array.
<Additional parameter> must contain the index of the dimension whose number of elements you want to get.
Default value for <Paramètre supplémentaire>: 1
Associative array: number of elements in the array.
tiDynamicBoolean.
  • True if the array is a dynamic array.
  • False otherwise.
tiElementDefinitionDefinition variable. Definition of the type of elements.
tiElementSizeInteger. Size (in bytes) of an array element.
tiElementTypeInteger. Type of array elements. <Result> is an integer corresponding to the constants of TypeVar.
tiKeyTypeInteger. Type of keys found in the associative array. <Result> is an integer corresponding to the constants of TypeVar.
Non-associative array: <Résultat> is 0.
tiNumberColumnsInteger. Number of columns found in a two-dimensional array. The number of columns corresponds to the 2nd dimension of the array.
If the array in not a two-dimensional array, tiNumberColumns = 0.
Associative array: 0.
tiNumberDimensionsInteger. Number of array dimensions (between 1 and 10)
Associative array: 1.
tiNumberRowsInteger. Number of rows found in a two-dimensional array. The number of rows corresponds to the 1st dimension of the array.
If the array is not a two-dimensional array, tiNumberRows = 0.
Associative array: 0.
tiTotalNumberInteger. Total number of elements found in the array.
tiTotalSizeInteger. Total size (in bytes) of array.
<Additional parameter>: Optional
Additional parameter that must be specified according to the requested information.
Observaciones

Equivalences

  • The tiNumberRows constant is equivalent to the tiDimension constant used with <Additional parameter> = 1. The following codes are identical:
    MyArray.Info(tiNumberRows)
    MyArray.Info(tiDimension, 1)
  • The tiNumberColumns constant is equivalent to the tiDimension constant used with <Additional parameter> = 2.
    MyArray.Info(tiNumberColumns)
    MyArray.Info(tiDimension, 2)

Miscellaneous

This function can be used with:
  • simple arrays.
  • fixed arrays.
  • dynamic arrays.
  • associative arrays.
Componente: wd300vm.dll
Versión mínima requerida
  • Versión 23
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