PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Deleting elements
  • Various
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
Deletes 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.
Notes:
  • This function is equivalent to ArrayDeleteAll.
  • WEBDEV - Browser codePHP This function can only be used with the Array and Associative Array variables.
Versions 16 and later
WINDEVJava This function is now available for the Java applications.
WEBDEV - Server codePHP This function is now available for the PHP sites.
Android This function is now available for the Android applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
New in version 16
WINDEVJava This function is now available for the Java applications.
WEBDEV - Server codePHP This function is now available for the PHP sites.
Android This function is now available for the Android applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
WINDEVJava This function is now available for the Java applications.
WEBDEV - Server codePHP This function is now available for the PHP sites.
Android This function is now available for the Android applications.
Universal Windows 10 App This function is now available for the Windows Phone applications.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
WEBDEV - Browser code This function is now available in browser code.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
AndroidAndroid Widget Java This function is now available for the Queue, List and Stack variables.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
WEBDEV - Browser code This function is now available in browser code.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
AndroidAndroid Widget Java This function is now available for the Queue, List and Stack variables.
Apple Watch This function is now available in Apple Watch mode.
WEBDEV - Browser code This function is now available in browser code.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
AndroidAndroid Widget Java This function is now available for the Queue, List and Stack variables.
Example
MyArray is array of 2 strings
MyArray[1] = "WINDEV"
MyArray[2] = "WEBDEV"
// Delete all the elements
DeleteAll(MyArray)
Syntax
DeleteAll(<Variable Name>)
<Variable Name>: Array, queue, stack or list
Name of variable to use. This variable can be:
  • an array. This array must be a one-dimensional array or a two-dimensional array.
  • a list.
  • a stack.
  • a queue.
WEBDEV - Browser codePHP Only the Array variables can be used.
Remarks

Deleting elements

  • One-dimensional array: the array is resized to 0. The array is not freed: new additions can be performed without re-allocating the array.
  • Two-dimensional array: only the array rows are deleted. The columns are kept. Therefore, ArrayAddLine can be used after ArrayDeleteAll.
  • Associative array: all the array elements are deleted.
  • Queue: all the queue elements are deleted.
  • Stack: all the stack elements are deleted.
  • List: all the list elements are deleted.
Note: To reinitialize (reset to 0 or to empty string "") the array elements without resizing the array, use VariableReset.
WEBDEV - Browser codePHP The deletion of elements is not available for the Queue, Stack and List variables.

Various

This function cannot be used with the fixed arrays.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230vm.dll
Windows Mobile wp230vm.dll
WEBDEV - Browser code WDJS.DLL
Java wd230java.jar
Linux wd230vm.so
Android wd230android.jar
Minimum required version
  • Version 14
This page is also available for…
Comments
Exemplo DeleteAll
//Exemplo DeleteAll
//Vamos eliminar os dados da array

tabListanumeros is array of 0 int
ArrayAddLine(tabListanumeros,10)
ArrayAddLine(tabListanumeros,5)
ArrayAddLine(tabListanumeros,3)
ArrayAddLine(tabListanumeros,1)
EDT_Texto = ArrayToString(tabListanumeros)
//http://doc.windev.com/en-US/?1000017357&name=deleteall_function
Info("Elimina Dados do Array")

DeleteAll(tabListanumeros)

EDT_Texto = ArrayToString(tabListanumeros)

//Blog com Video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/12/aula-997-windev-array-deleteall.html
https://www.youtube.com/watch?v=KghH0g-lRck
De matos
Dec. 14 2016