rand() — returns random u32.

Description:

u32 rand();

Returns random u32.

Return values:

Returns random u32. Type of return value u32.

Example:

<item addr="524:248" INTERFACEID="2023" name="Test for rand function" type="script">

V-ID/s:1 
{
	u32 s = rand();
	
	// Result output to the interface
	u8 strForMess[100];
	sprintf(strForMess, "%cRandom number: %d", 1, s);
	setStatus(INTERFACEID:32, &strForMess);
}

</item>

The result of performing the example in the interface:

Every second the messages with random number appear in the interface.