From Clomosy Docs
ClomosyAdmin (talk | contribs) No edit summary |
ClomosyAdmin (talk | contribs) No edit summary |
||
| Line 26: | Line 26: | ||
<h2> See Also </h2> | <h2> See Also </h2> | ||
* [[ClMath | ClMath]] | * [[ClMath | ClMath]] | ||
{{#seo:|title=GenerateRandom in Clomosy - Clomosy Docs}} | |||
{{#seo:|description=Learn to generate random numbers using the clMath.GenerateRandom function in Clomosy.}} | {{#seo:|description=Learn to generate random numbers using the clMath.GenerateRandom function in Clomosy.}} | ||
Latest revision as of 15:15, 24 December 2024
clMath.GenerateRandom(value1,value2:Integer):Integer
This function is a custom function used on the Clomosy platform. It is employed to generate a random number between two numerical values. The randomly generated number within the function is inclusive of the first parameter but exclusive of the last parameter.
Example
In the example, when the program is executed, a random number between 10 and 20 will be generated.
var
NumberOfPredictions : Integer;
{
NumberOfPredictions = clMath.GenerateRandom(10,20);
ShowMessage('The generated number: '+IntToStr(NumberOfPredictions));
}
Output:
The generated number: 10