Generates a real random number between two boundaries.Syntax :HB_Random( [<nMaxLimit>] ) --> nRandomNumber or HB_Random( <nMinLimit>, <nMaxLimit> ) --> nRandomNumberArguments :<nMaxLimit> : Upper boundary of the random number; default is 1. <nMinLimit> : Lower boundary of the random number; default is 0. Note that the first parameter is only interpreted as lower boundary when two parameters are passed.Return :A random real numeric value with two decimal digits, limited by the two boundaries.Description :This function generates a real random number between two boundaries. The boundary values are excluded from the range. When only one boundary is passed to the function, it is considered the maximum boundary. The minimum boundary, in that case, is zero. When no boundaries are passed, the function returns a number between 0.00 and 1.00.Note :Use function HB_RandomInt() to generate random integer values.See also:HB_RandomInt(), HB_RandomSeed()Example :PROCEDURE Main // Random number between 0.01 and 0.99 ? HB_Random() // Random number between 0.01 and 9.99 ? HB_Random(10) // Random number between 8.01 and 9.99 ? HB_Random(8,10) RETURN

Advertisements