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

  1. Rem * Title  : IF THEN Commands
  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 you how to use the if commands
  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 set variable to one
  14. variable=1
  15.     
  16. rem the IF THEN command will execute any commands on the same line
  17. rem has the THEN command  
  18. if variable=1 then print "variable=1"
  19.  
  20. rem the IF ENDIF commands will execute any commands between 
  21. rem the IF and ENDIF
  22. if variable=1
  23.     print "variable=1"
  24. endif
  25.  
  26. rem the IF ELSE ENDIF commands will execute any commands between
  27. rem the If ENDIF
  28. if variable=1
  29.     rem if variable = one then do this
  30.     print "variable=1"
  31. else
  32.     rem if variable is not one then do this
  33.     print "variable is not 1"
  34. endif
  35.  
  36. rem Will wait for you to press any key
  37. print "PLEASE PRESS ANY KEY"
  38. suspend for key
  39.  
  40. rem End the program
  41. end
  42.