PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

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
Dynamic structure (Type of variable)
In french: Structure dynamique (Type de variable)
A structure can be allocated dynamically: we talk of dynamic instantiation of the structure.
The dynamic instantiation of structure is used to create a structure at a given time and to free this structure when it is no longer used.
To instantiate a structure, you must:
  1. Declare a dynamic structure.
  2. Instantiate a structure.
Note: The structure is automatically freed when it is not used anymore. However, you can force the destruction of the structure.
Versions 18 and later
Universal Windows 10 App This feature is available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This feature is available in Windows Store apps mode.
Universal Windows 10 App This feature is available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This feature is available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This feature is available in Universal Windows 10 App mode.
Universal Windows 10 App This feature is available in Universal Windows 10 App mode.
Example
MyExampleFile is Structure
Name is string
Extension is string
Directory is string
END
SourceFile is dynamic MyExampleFile
// ...
SourceFile = new MyExampleFile
// Process on the object ...
// ...
// Free the object
delete SourceFile
Syntax

Declare a dynamic structure Hide the details

<Variable Name> is <Structure Name> dynamic
<Variable Name>:
Name identifying the variable of the structure.
<Structure Name>:
Name identifying the structure. This name was defined when creating the structure

Instantiating a dynamic structure Hide the details

<Variable Name> = New <Structure Name>
<Variable Name>:
Name identifying the variable of the structure.
<Structure Name>:
Name of a structure that was declared beforehand.

Freeing a dynamic structure Hide the details

Delete <Structure Name>
<Structure Name>:
Name of the structure variable to use.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment