From Clomosy Docs

No edit summary
No edit summary
Line 26: Line 26:
<h2> See Also </h2>
<h2> See Also </h2>
* [[ClMath | ClMath]]
* [[ClMath | ClMath]]
{{#seo:|description=Learn to generate random numbers using the clMath.GenerateRandom function in Clomosy.}}

Revision as of 11:08, 24 December 2024

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:

See Also