NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
ex_Random.nxc

This is an example of how to use the Random function.

int x = Random(); // signed int between -32767..32767
unsigned i = Random(100); // 0..99
int ending = 4000, starting = 1000;
unsigned int j = Random(ending-starting)+starting; // 1000..3999