home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / db3rand.zip / TESTRAND.PRG < prev    next >
Text File  |  1989-11-02  |  796b  |  44 lines

  1. * testrand.prg  is a dbase program to illustrate use of a
  2. * random number generator in the util.prg file called random.prg
  3. * CALL FUNCTION BY: 'do random with randnum,maxnumber'
  4. *   where randnum is the random number passed back and maxnumber is
  5. *   the largest possible integer that is possible.
  6.  
  7. close procedure
  8. set procedure to util.prg
  9. *INITIALIZE MEMORY VARIABLE
  10. randnum = 0
  11.  
  12.  
  13. ?'FIND RANDOM NUMBERS FROM 0 TO 9999'
  14. do random with randnum,9999
  15. ?randnum
  16. do random with randnum,9999
  17. ?randnum
  18.  
  19. ?
  20. ?'FIND RANDOM NUMBERS FROM 0 TO 99'
  21. do random with randnum,99
  22. ?randnum
  23. do random with randnum,99
  24. ?randnum
  25. ?
  26. ?'FIND RANDOM NUMBERS FROM 0 TO 9'
  27. do random with randnum,9
  28. ?randnum
  29. do random with randnum,9
  30. ?randnum
  31. do random with randnum,9
  32. ?randnum
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.