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
  • Supported types
  • Mean of durations
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
Calculates the mean of the values within an array.
Ejemplo
// Moyenne des éléments d'un tableau d'entiers 
MonTableau is array of int = [1,2,3]
MaMoyenne is numeric
MaMoyenne = MonTableau.Mean() // MaMoyenne = 2
Sintaxis

Cálculo de la media de los elementos de un array unidimensional (tipos numéricos) Ocultar los detalles

<Result> = <Array>.Mean()
<Result>: Numeric
Mean of the numeric elements found in the array.
<Array>: Nombre del control
Name of the one-dimensional array of numeric types containing the elements whose mean must be calculated.

Cálculo de la media de los elementos de un array unidimensional (tipos estructurados) Ocultar los detalles

<Result> = <Array>.Mean(<Member>)
<Result>: Numeric
Mean of values of members.
<Array>: Nombre del control
Name of the one-dimensional array of structured types. Permitted structured types are: class, dynamic class, structure, dynamic structure.
Note: In an array of dynamic classes or dynamic structures, if the element is not allocated, it is ignored.
<Member>: Cadena de caracteres
Name of the member containing the values that must be used to calculate the mean.

Cálculo de la media de los elementos que se encuentran en una columna de un array bidimensional Ocultar los detalles

<Result> = <Array>.Mean(<Column>)
<Result>: Numeric
Mean of column values.
<Array>: Nombre del control
Name of the two-dimensional numeric array.
<Column>: Integro
Index of the array column containing the values used to calculate the mean.
Observaciones

Supported types

The following types are supported for the arrays of numeric values and for the members of arrays of structured types:
  • all integer types (on 1, 2, 4 or 8 bytes, signed or unsigned + system integer).
  • real (4 or 8-byte), currency and numeric types.
  • the Date type.

Mean of durations

If <Array>.Media is used to calculate an average of durations, all parameters must be of type Duration.


Sequence of functions
You can use array functions in a sequence.
The following functions can be used in a sequence: This sequence can be used as a source for a FOR ALL statement or it can end with one of the following functions: Example:
gnMean = garrUser.Filter(cbFilter).Map(cbMap).Mean()
Clasificación Lógica de negocio / UI: Código neutro
Componente: wd300vm.dll
Versión mínima requerida
  • Versión 24
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