home *** CD-ROM | disk | FTP | other *** search
- // Example: 145 from Library Reference
- #include "..\3D-Ware\dddware.h"
- #include <stdio.h>
- short random;
- short main(void)
- {
- dddInitKeybd();
- while (dddkeycode!=_ESC)
- {
- random = dddRnd();
- if (dddkeypressed[_SPACE]) // Check to see if space bar is pressed.
- {
- dddSetRnd(1000); // Set the random number to a known value.
- }
- printf("The random value is %d\n",random);
- }
- dddRestoreKeybd();
- return 0; // Bye.
- }
-