ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Queue, stack, list and array functions / Array functions
  • Equivalences
  • Miscellaneous
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Returns the characteristics of an array: type of elements, number of dimensions, dimensions, etc.
Remark: This function can only be used on WLanguage arrays.
Example
// Total number of elements found in a one-dimensional array
MyArray is array of 5 int
...
nbDim is int
nbDim = ArrayInfo(MyArray, tiTotalNumber)
// nbDim is equal to 5
// Array dimensions
MyArray is array of 5 by 2 int
nbRowDim is int
nbRowDim = ArrayInfo(MyArray, tiNumberRows)
// NbRowDim is equal to 5
nbColumnDim is int
nbColumnDim = ArrayInfo(MyArray, tiNumberColumns)
// NbColumnDim is equal to 2
Syntax
<Result> = ArrayInfo(<WLanguage array> , <Type of information> [, <Additional parameter>])
<Result>: Integer or boolean
Requested information.
Remark: The function returns no result on a dynamic array that has not been created.
<WLanguage array>: Array
Name of 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 is requested.
Default value for <Additional parameter>: 1
Associative array: Number of elements found in the array.
tiDynamicBoolean.
  • True if the array is a dynamic array.
  • False otherwise.
WEBDEV - Browser code This constant is not available.
tiElementDefinitionDefinition variable. Definition of the type of elements.
WEBDEV - Browser code This constant is not available.
tiElementSizeInteger. Size (in bytes) of an array element.
WEBDEV - Browser code This constant is not available.
tiElementTypeInteger. Type of array elements. <Result> is an integer corresponding to the constants of TypeVar.
WEBDEV - Browser code This constant is not available.
tiKeyTypeInteger. Type of keys found in the associative array. <Result> is an integer corresponding to the constants of TypeVar.
Non-associative array: <Result> is equal to 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.
WEBDEV - Browser code This constant is not available.
<Additional parameter>: Optional
Additional parameter that must be specified according to the requested information.
Remarks

Equivalences

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

Miscellaneous

This function can be used with:
  • simple arrays.
  • fixed arrays.
  • dynamic arrays.
  • associative arrays.
Component: wd290vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help