ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Queue, stack, list and array functions / Array functions
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
Remark: These functions are also available in prefix syntax (Functions for managing arrays (prefix syntax)).
These functions allow you to easily handle the Array, Associative Array and Dynamic Array variables:
AddAdds an element in last position:
  • of a one-dimensional WLanguage array.
  • of an advanced array property (array of events of gglCalendar, etc.).
  • from a WLanguage list.
AddColumnAdds a column at the end of a two-dimensional array property (xlsDocument variable for example]).
AddLineAdds a row at the end:
  • of a one- or two-dimensional WLanguage array.
  • of a two-dimensional array property of a variable type (xlsDocument variable for example).
AddReferenceAdds the reference of an object at the last position in a one-dimensional array.
ApplyExecutes a procedure for each element of a WLanguage array.
ArrayAddAdds an element in last position:
  • of a one-dimensional WLanguage array.
  • of an advanced array property (array of events of gglCalendar, etc.).
  • of a WLanguage list.
ArrayAddLineAdds a row at the end:
  • of a one- or two-dimensional WLanguage array.
  • of an advanced two-dimensional array property (xlsDocument, etc.).
ArrayAddReferenceAdds the reference of an object at the last position in a one-dimensional array.
ArrayAddSortedAdds an element to a one-dimensional WLanguage array taking into account:
  • the sort criteria defined by ArraySort
  • the comparison operator described in the class, if the elements of the array are class instances.
ArrayCopyCopies the content of an array to another array.
ArrayCountReturns:
  • the number of elements in a one-dimensional array.
  • the number of rows in a two-dimensional array.
  • the number of elements in the first dimension of a three-dimensional or N-dimensional array.
ArrayDeleteDeletes an element at a given position:
  • from a one-dimensional WLanguage array.
  • from an advanced array property (array of gglCalendar events, etc.).
  • from an associative array.
  • from a WLanguage list.
ArrayDeleteAllDeletes all elements:
  • from a one-dimensional or two-dimensional WLanguage array.
  • from an associative array.
  • from an advanced array property (array of gglCalendar events, etc.).
  • from a WLanguage queue.
  • from a WLanguage stack.
  • from a WLanguage list.
ArrayDeleteDuplicateDeletes the duplicates from an array.
ArrayDeleteLineDeletes a row at a given position:
  • from a two-dimensional array.
  • from the advanced array property (array of gglCalendar events, etc.)
The array size is automatically reduced.
ArrayDistinctReturns an array without duplicates.
ArrayInfoReturns the characteristics of an array: type of elements, number of dimensions, dimensions, etc.
ArrayInsertInserts an element at a given position:
  • into a one-dimensional array.
  • into an associative array.
  • into an advanced array property (array of gglCalendar events, etc.).
  • into a WLanguage list.
ArrayInsertLineInserts a row at a given position:
  • into a two-dimensional WLanguage array.
  • into an advanced two-dimensional array property (xlsDocument, etc.).
ArrayInsertReferenceAdds the reference of an object at given position in a one-dimensional array.
ArrayIntersectReturns an array corresponding to the intersection of two arrays.
ArrayMoveAllows 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.).
ArrayMoveLineAllows you to:
  • 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.
ArrayReverseReverses the content of a one-dimensional array.
ArraySeekSearches for the index of an element in a WLanguage array.
ArraySeekByProcedureSeeks an element in a one-dimensional WLanguage array by using a comparison procedure.
ArrayShuffleShuffles the elements of a WLanguage array.
ArraySortSorts a WLanguage array.
ArraySwapLineUsed to swap two rows in a two-dimensional array or in an advanced array property.
ArrayToCSVConverts a one-dimensional array or a two-dimensional array into a character string in CSV format.
New in version 2024
ArrayToParameters
Converts an array of elements into a list of parameters.
ArrayToStringConverts a one- or two-dimensional array to a character string.
ArrayUnionReturns an array corresponding to the union of two arrays.
ArrayUnionAllReturns an array corresponding to the union of two arrays (without deleting duplicates).
CheckAllFalseReturns True if all the elements of an array are False.
CheckAllTrueReturns True if all the elements of an array are True.
CheckAnyFalseReturns True if at least one element of an array is False.
CheckAnyTrueReturns True if at least one element of an array is True.
CSVToArrayFills a one- or two-dimensional array of the specified type with the character string in CSV format passed in parameter.
DeleteDeletes an element at a given position:
  • from a one-dimensional WLanguage array.
  • from an advanced array property (array of gglCalendar events, etc.).
  • from an associative array.
  • from a WLanguage list.
DeleteAllDeletes all the elements:
  • from a one-dimensional or two-dimensional WLanguage array.
  • from an associative array.
  • from an advanced array property (array of gglCalendar events, etc.).
  • from a WLanguage queue.
  • from a WLanguage stack.
  • from a WLanguage list.
DeleteColumnDeletes a column at a given position from the advanced array property (array of gglCalendar events, etc.).
DeleteLineDeletes a line at a given position:
  • from a two-dimensional array.
  • from the advanced array property (array of gglCalendar events, etc.).
FileToArrayFills an array of classes or structures with the content of an HFSQL data file or query.
FilterReturns an array containing the elements of a source array for which a procedure returns True.
InsertInserts an element at a given position:
  • into a one-dimensional WLanguage array.
  • into an associative array.
  • into an advanced array property (array of gglCalendar events, etc.).
  • into a WLanguage list.
InsertColumnInserts a column at a given position into an advanced two-dimensional array property (xlsDocument, ...).
InsertLineInserts a row at a given position:
  • into a two-dimensional WLanguage array.
  • into an advanced two-dimensional array property (xlsDocument, etc.).
InsertReferenceAdds the reference of an object at given position in a one-dimensional array.
MapExecutes a procedure on each element of a source array and returns the results in a WLanguage array.
MaxReturns the greatest value passed as parameter.
MeanCalculates the mean of several elements:
  • elements found in an array,
  • numeric values, ...
MinReturns the lowest value.
MoveAllows 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.).
MoveColumnMoves or swaps a column in a two-dimensional array property contained in an advanced type (xlsDocument, etc.).
MoveLineAllows you to:
  • move a row in a two-dimensional WLanguage array or in an advanced array property. The other array rows are moved accordingly.
  • swap two rows in a two-dimensional WLanguage array or in an advanced array property.
ReduceApplies a computation to each element of a WLanguage array.
SeekSearches for the index of an element in a WLanguage array.
SeekByProcedureSeeks an element in a one-dimensional array by using a comparison procedure.
SortSorts a WLanguage array.
StringToArrayFills a one- or two-dimensional array of the specified type with the character string passed in parameter.
SumCalculates the sum of the array elements.
SwapLineUsed to swap two rows in a two-dimensional array or in an advanced array property.

Sequence of functions
You can use array functions in a sequence.
The following functions can be used in a sequence: This sequence can be used as a source for a FOR ALL statement or it can end with one of the following functions:
Example:
gnMean = garrUser.Filter(cbFilter).Map(cbMap).Mean()
Remark: To reset all the array elements to their initial value, use VariableReset.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/04/2023

Send a report | Local help