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 / Windows functions / Miscellaneous WINDEV functions
  • Case of arrays
  • Case of objects
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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, queue, stack or list, function VariableReset is equivalent to function DeleteAll: all elements are deleted.
Example
MonTableau is array of 5 2-byte int
VariableReset(MonTableau)
Syntax
VariableReset(<Variable name>)
<Variable name>: Variable type
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
Component: wd300vm.dll
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/21/2024

Send a report | Local help