NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
int Random ( unsigned int  n = 0)
inline

Generate random number.

Return a signed or unsigned 16-bit random number. If the optional argument n is not provided the function will return a signed value. Otherwise the returned value will range between 0 and n (exclusive).

Parameters
nThe maximum unsigned value desired (optional).
Returns
A random number
Examples:
ex_ArrayMax.nxc, ex_CircleOut.nxc, ex_dispgoutex.nxc, ex_EllipseOut.nxc, ex_file_system.nxc, ex_Random.nxc, ex_sin_cos.nxc, ex_sind_cosd.nxc, ex_string.nxc, ex_SysDrawEllipse.nxc, and ex_wait.nxc.