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 Windows / Funciones varias de WINDEV
  • Random pool
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
Returns a random number.
Note: To obtain a random number that can be used with cryptographic technologies (recommended for security reasons), use the RandomCryptoInteger function.
Ejemplo
// Retrieve a real included between 0 and 1
ResRandom = Random()
// Retrieve an integer included between 1 and 33
ResRandom = Random(33)
// Retrieve an integer included between 7 and 21
ResRandom = Random(7, 21)
Sintaxis

Retrieving a random number included between 0 and 1 Ocultar los detalles

<Result> = Random()
<Result>: Real
Random number included between 0 and 1.

Retrieving a random number included between 1 and a value Ocultar los detalles

<Result> = Random(<Upper bound>)
<Result>: entier
Random number included between 1 and a specified value (inclusive).
<Upper bound>: entier
Upper bound of the number returned (value included between 1 and 2 147 483 647).

Retrieving a random number included between two values Ocultar los detalles

<Result> = Random(<Lower bound> , <Upper bound>)
<Result>: entier
Random number included between two specified values (inclusive).
<Lower bound>: entier
Lower bound of the number returned (value included between 0 and 2 147 483 647).
<Upper bound>: entier
Upper bound of returned number (value included between 0 and 2 147 483 647).
Observaciones

Random pool

The "pool" from which the random number is "chosen" can be initialized by InitRandom.
If InitRandom is not called, the random values generated by Random will be the same for each program execution.
Clasificación Lógica de negocio / UI: Código neutro
Componente: wd300std.dll
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: 28/03/2025

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