ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Miscellaneous WINDEV functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Initializes the generator of random numbers.
WEBDEV - Browser code This function has no effect in Browser code.
Example
// Initialize the generator of random numbers
InitRandom()
Syntax
<Result> = InitRandom(<n>)
<Result>: Integer
New in version 2025
Value of the random seed chosen by the system to initialize the random number generator.
If the <n> parameter is specified, the seed corresponds to this value.
WEBDEV - Browser codeAndroidAndroid Widget JavaPHP This value is not available.
<n>: Integer
Base number of the random number generator.
If this parameter is not specified, the random number generator is based on the system time (hundredths of a second).
Remarks
  • If InitRandom is not called, the random values generated by Random will be the same whenever the program is run.
  • If InitRandom is called successively, identical sequences will be returned because InitRandom uses the system time to generate sequences of random numbers.
  • Using the <n> parameter does not necessarily guarantee to get different sequences.
Business / UI classification: Neutral code
Component: wd300std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 01/08/2025

Send a report | Local help