|
|
|
|
|
Dynamic structure (Variable type) In french: Structure dynamique (Type de variable)
A structure can be allocated dynamically: this is known as dynamic structure instantiation. 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: - Declare a dynamic structure.
- Instantiate a structure.
Remark: The structure is automatically released when no longer in use.. However, you can force the destruction of the structure. MyExampleFile is TO
Name is string
Extension is string
Directory is string
END
SourceFile is dynamic MyExampleFile
SourceFile = new MyExampleFile
delete SourceFile
MyClass is Class
sMB is string
END
MyExampleFile is Structure
Name is string
Extension is string
Directory is string
END
ArraySourceFile is array * dynamic MyClass.MyExampleFile
Syntax
Declare a dynamic structure Hide the details
<Variable name> is dynamic <Structure name>
<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. <Structure name>: Name of the structure variable to use.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|