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
Note: 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 gglCalendar events, ...).
  • 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 gglCalendar events, ...).
  • 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 line 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:
  • 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:
  • 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.
ArrayToParametersConverts 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 as 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 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:
  • 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:
  • 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()
Note: To reset all array elements to their initial values, use VariableReset.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/30/2024

Send a report | Local help