PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Case of arrays
  • Case of objects
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
VariableReset (Function)
In French: VariableRAZ
Resets the variable to its initial value.
If the variable is a structure, a class, a composite variable, the function resets all the members to their initial value.
If the variable is an array, the function resets all the elements to their initial value without modifying the dimensions of the array.
If the variable is an associative array, a queue, a stack or a list, VariableReset is equivalent to DeleteAll: all the elements are deleted.
Versions 15 and later
Android This function is now available for the Android applications.
Java This function is now available for the Java applications.
New in version 15
Android This function is now available for the Android applications.
Java This function is now available for the Java applications.
Android This function is now available for the Android applications.
Java This function is now available for the Java applications.
Versions 16 and later
Universal Windows 10 App This function is now available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This function is now available for the Windows Phone 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.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
MyArray is array of 5 by 2 int
VariableReset(MyArray)
Syntax
VariableReset(<Variable Name>)
<Variable Name>: Type of variable
Variable to reinitialize.
Remarks

Case of arrays

If the variable is an Array, the array is not resized. All the array elements are reset to their initial values:
  • The booleans are reset to False.
  • The numeric values are reset to 0.
  • The strings are reset to empty strings ("").
  • The members of instances and structures are reset to their initial values.
  • The instances, structures and dynamic arrays are freed.
To reset the size of a one-dimensional array to 0, use ArrayDeleteAll.

Case of objects

If the variable is an object:
  • the destructor is called
  • if it is a dynamic instance, the object is freed.
  • if it is a non-dynamic instance, the constructor is called
AndroidJava Special case in Java/Android
The concept of destructor does not exist in Java/Android. Therefore, the code found in the destructor of a class will never be run.

An object is freed by the garbage collector when it is no longer referenced in the application. There is no way to foresee the moment when this operation occurs.

To force an object to be freed, you have the ability to assign it to NULL or to use the Free statement.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230vm.dll
Windows Mobile wp230vm.dll
Java wd230java.jar
Linux wd230vm.so
Android wd230android.jar
Minimum required version
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment