AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Sintaxis WLanguage / Declaración de variables
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
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:
  1. Declare a dynamic structure.
  2. Instantiate a structure.
Remark: The structure is automatically released when no longer in use.. However, you can force the destruction of the structure.
Ejemplo
MyExampleFile is TO 
	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
// Declaration of the structure in the declaration code of a class
MyClass is Class
sMB is string
END
 
MyExampleFile is Structure
Name is string
Extension is string
Directory is string
END
 
//---------------------------------------------------------------------
// Declaration of a dynamic array with this structure:
ArraySourceFile is array * dynamic MyClass.MyExampleFile
Sintaxis

Declare a dynamic structure Ocultar los detalles

<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 Ocultar los detalles

<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 Ocultar los detalles

Delete <Structure name>
<Structure name>:
Name of the structure variable to use.
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 30/09/2024

Señalar un error o enviar una sugerencia | Ayuda local