home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 63 / CDACTUAL63.iso / Aplicaciones / DarkBasic / DemoDarkBasic.exe / help / examples / text / exam02.dba < prev    next >
Encoding:
Text File  |  2000-04-09  |  1.0 KB  |  44 lines

  1. Rem * Title  : Text Command Usage
  2. Rem * Author : DBS-MB
  3. Rem * Date   : 1st August 99
  4. rem ===================================================
  5. rem DARK BASIC EXAMPLE PROGRAM 2
  6. rem ===================================================
  7. rem This program will show how to use the text command 
  8. rem ---------------------------------------------------
  9.  
  10. rem Set the ink to white and paper color to black 
  11. ink rgb(244,214,210),1
  12.  
  13. message$="PUT YOUR MESSAGE HERE"
  14.  
  15. rem Print 100 strings on screen
  16. for t=1 to 100
  17.  
  18.     rem Were across screen text will be printed
  19.     AcrossScreen=rnd(640)
  20.  
  21.     rem Were down screen text will be printed
  22.     DownScreen=rnd(480)
  23.     
  24.     rem Print text
  25.     text AcrossScreen,DownScreen,message$
  26.  
  27. next t
  28.  
  29. ink 1000,1
  30. center text 320,240,"PRESS SPACEBAR"
  31. suspend for key
  32.  
  33. rem Clear the screen
  34. cls 
  35.  
  36. rem To print numbers with your text use the str$() command
  37. text 320,240,"My number is "+str$(42)+" don't you know.."
  38.  
  39. rem Will wait for you to press any key
  40. suspend for key
  41.  
  42. rem End the program
  43. end
  44.