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 / Funciones WLanguage / Funciones estándar / Funciones de colas, pilas, listas y arrays / Funciones de arrays
  • Adding an element
  • Miscellaneous
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
Adds an element to a one-dimensional WLanguage array taking into account:
  • the sort criteria defined by <Array>.Sort
  • the comparison operator described in the class, if the elements of the array are class instances.
Note: This function can only be used on WLanguage arrays.
Ejemplo
MonTableau is array of 2 strings
MonTableau[1] = "WINDEV"
MonTableau[2] = "WEBDEV"
MonTableau.Trie(asAscending)
MonTableau.AjouteTrié("WEBDEV et WINDEV")
// Afficher le contenu des éléments
Trace(MonTableau[1]) // Affiche "WEBDEV" 
Trace(MonTableau[2]) // Affiche "WEBDEV et WINDEV" 
Trace(MonTableau[3]) // Affiche "WINDEV"
Sintaxis
<Result> = <WLanguage array>.AddSorted(<Element value>)
<Result>: Integro
  • Index at which the specified element was added,
  • -1 if the element could not be added.
A WLanguage error occurs if:
  • no sort criteria have been defined (<Array>.Sort function or comparison operator in the class).
  • the array did not meet the sort criteria before the addition.
<WLanguage array>: Array
Name of the Array variable to use. This array must be a one-dimensional array.
<Element value>: Tipo de elementos del array
Element that must be added to the specified array.
Observaciones

Adding an element

When <Array>.AddSorted is called:
  • the array is automatically enlarged to receive the new element.
  • the element is converted (if necessary) into the type of the other array elements.
  • the element is placed in the array according to the sort.

Miscellaneous

This function cannot be used on:
  • non-created arrays,
  • fixed arrays.
Componente: wd300vm.dll
Versión mínima requerida
  • Versión 23
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