PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Your version: XXA150056M

Home | Sign in | English UK
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 17 and later
WEBDEV - Browser code Most of these functions are now available in browser code.
New in version 17
WEBDEV - Browser code Most of these functions are now available in browser code.
WEBDEV - Browser code Most of these functions are now available in browser code.
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).
Versions 24 and later
AddReference
New in version 24
AddReference
AddReference
Adds the reference of an object at the last position in a one-dimensional array.
ArrayAddAdds 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.
ArrayAddLineAdds a row at the end:
  • of a one- or two-dimensional WLanguage array.
  • of an advanced two-dimensional array property (xlsDocument, ...).
Versions 24 and later
ArrayAddReference
New in version 24
ArrayAddReference
ArrayAddReference
Adds 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, ...).
  • 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.
ArrayInfoReturns the characteristics of an array: type of elements, number of dimensions, dimensions, ...
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, ...).
Versions 24 and later
ArrayInsertReference
New in version 24
ArrayInsertReference
ArrayInsertReference
Adds the reference of an object at given position in a one-dimensional array.
ArrayMixMixes the elements of a WLanguage array.
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.
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.
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, ...).
  • 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, ...).
FileToArrayFills an array of classes or structures with the content of a HFSQL data file or query.
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, ...).
Versions 24 and later
InsertReference
New in version 24
InsertReference
InsertReference
Adds the reference of an object at given position in a one-dimensional 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.
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:
Versions 17 and later
Mean
New in version 17
Mean
Mean
Calculates the mean of several elements:
  • elements found in an array,
  • numeric values, ...
Versions 17 and later
Sum
New in version 17
Sum
Sum
Calculates the sum of the array elements.
Note: 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