PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | French EN
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Versions 16 and later
Android Most of these functions are now available for Android applications.
New in version 16
Android Most of these functions are now available for Android applications.
Android Most of these functions are now available for Android applications.
Versions 16 and later
Universal Windows 10 App Most of these functions are now available for Windows Phone applications.
New in version 16
Universal Windows 10 App Most of these functions are now available for Windows Phone applications.
Universal Windows 10 App Most of these functions are now available for Windows Phone applications.
Versions 17 and later
iPhone/iPad Most of these functions are now available for iPhone/iPad applications.
WEBDEV - Browser code Most of these functions are now available in browser code.
New in version 17
iPhone/iPad Most of these functions are now available for iPhone/iPad applications.
WEBDEV - Browser code Most of these functions are now available in browser code.
iPhone/iPad Most of these functions are now available for iPhone/iPad applications.
WEBDEV - Browser code Most of these functions are now available in browser code.
Versions 21 and later
Universal Windows 10 App Most of these functions are now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App Most of these functions are now available in Universal Windows 10 App mode.
Universal Windows 10 App Most of these functions are now available in Universal Windows 10 App mode.
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 criterion defined by ArraySort.
ArrayCopyCopies the content of an array into another array.
ArrayCountReturns:
  • the number of elements found in a one-dimensional array.
  • the number of rows found in a two-dimensional array.
  • the number of elements found 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.
Versions 26 and later
ArrayDistinct
New in version 26
ArrayDistinct
ArrayDistinct
Returns 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.
Versions 26 and later
ArrayIntersect
New in version 26
ArrayIntersect
ArrayIntersect
Returns 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.
ArraySeekSeeks the subscript 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.
ArrayToStringConverts a one-dimensional array or a two-dimensional array into a character string.
Versions 26 and later
ArrayUnion
New in version 26
ArrayUnion
ArrayUnion
Returns an array corresponding to the union of two arrays.
Versions 26 and later
ArrayUnionAll
New in version 26
ArrayUnionAll
ArrayUnionAll
Returns 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 a 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.
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 of advanced type (xlsDocument, ...).
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.
SeekSeeks the subscript 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.
SwapLineUsed to swap two rows in a two-dimensional array or in an advanced array property.
Other functions also available for the arrays:
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
Example Array [N,X]
//Example Array [N,X]

arrMensajes is array of 1 by 3 strings

i is int = 1

SQLExec(sQuery,ds)

WHILE SQLFetch(ds) = 0
arrMensajes[i,1] = SQLGetCol(ds, 1) //id
arrMensajes[i,2] = SQLGetCol(ds, 2) //numero
arrMensajes[i,3] = SQLGetCol(ds, 3) //mensaje
i++
Dimension(arrMensajes, i, 3)
END
BOLLER
17 Jul. 2019
Exemplo Array
tabListanumeros is array of 0 int
ArrayAddLine(tabListanumeros,10)
ArrayAddLine(tabListanumeros,5)
ArrayAddLine(tabListanumeros,2)
ArrayAddLine(tabListanumeros,20)
ArraySort(tabListanumeros,asAscending)
FOR x=1 TO ArrayCount(tabListanumeros)
SAI_array+=tabListanumeros[x]+CR
END
//Frances
tabListanumeros_f est tableau de 0 entier
TableauAjouteLigne(tabListanumeros_f,10)
TableauAjouteLigne(tabListanumeros_f,5)
TableauAjouteLigne(tabListanumeros_f,2)
TableauAjouteLigne(tabListanumeros_f,20)
TableauTrie(tabListanumeros_f,ttCroissant)
POUR x=1 A TableauOccurrence(tabListanumeros_f)
SAI_array+=tabListanumeros_f[x]+RC
FIN
//Blog com Video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/02/curso-windev-array-001.html
De matos AMARILDO
18 Feb. 2016