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

  1. Rem * Title  : Using Print
  2. Rem * Author : DBS-MB
  3. Rem * Date   : 1st August 99
  4. rem ========================================
  5. rem DARK BASIC EXAMPLE PROGRAM 1
  6. rem ========================================
  7. rem This program will show how to use print 
  8. rem ----------------------------------------
  9.  
  10. rem Set the ink to white and paper color to black 
  11. ink rgb(244,214,210),1
  12.  
  13. rem The command cls will clear the screen and reset the cursor
  14. rem so that any text printed on screen will start from the top left
  15. cls
  16.  
  17. rem You can set were on screen your text
  18. rem will be printed by using the set cursor command
  19.  
  20. rem Text will be printed top left of screen 
  21. set cursor 0,0
  22.  
  23. rem The print command can print strings 
  24. print "MY FIRST STRING "
  25.  
  26. rem The print command can print a string variable
  27. rem first make stirng variable
  28. a$="FIRST STRING "
  29.  
  30. rem Then print it
  31. print a$
  32.  
  33. rem The print command can print string and string variable together
  34. print "SECOND STRING ",a$
  35.  
  36. rem the print command can print string and string variable in any order
  37. print a$,"SECOND STRING "
  38.  
  39. rem Numbers and strings can be printed together
  40.  
  41. rem A intiger number
  42. a=100
  43.  
  44. rem A real number
  45. a#=1.1
  46.  
  47. rem A string
  48. a$="SEE SOME NUMBERS"
  49.  
  50. rem Print them all
  51. print a$," ",a," ",a#," THAT WAS GOOD"
  52.  
  53. rem Will wait for you to press any key
  54. suspend for key
  55.  
  56. rem End the program
  57. end
  58.