home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 63 / CDACTUAL63.iso / Aplicaciones / DarkBasic / DemoDarkBasic.exe / help / examples / 2d / exam04.dba < prev    next >
Encoding:
Text File  |  2000-04-09  |  856 b   |  37 lines

  1. Rem * Title  : Draw A Dot
  2. Rem * Author : DBS-MB
  3. Rem * Date   : 1st August 99
  4. rem ==========================================
  5. rem DARK BASIC EXAMPLE PROGRAM 4
  6. rem ==========================================
  7. rem This program will draw a dot on screen
  8. rem ------------------------------------------
  9.  
  10. rem Set the ink to white and paper color to black 
  11. ink rgb(244,214,210),0
  12.  
  13. rem We will draw 1000 dot on screen
  14. for t=1 to 1000
  15.     rem Get a random ink color
  16.     ink rgb(rnd(255),rnd(255),rnd(255)),1
  17.     
  18.     rem where on screen to draw dot
  19.     left=rnd(640)
  20.     top=rnd(480)
  21.  
  22.     rem Draw a dot
  23.     dot left,top
  24. next t
  25.  
  26. rem Set the ink to white and paper color to black 
  27. ink rgb(244,214,210),1
  28.  
  29. rem Print a message on screen
  30. text 200,240,"press the spacebar to quit"
  31.  
  32. rem Will wait for you to press any key
  33. suspend for key
  34.  
  35. rem End the program
  36. end
  37.