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

  1. Rem * Title  : File Expressions
  2. Rem * Author : DBS-LB
  3. Rem * Date   : 1st April 2000
  4. rem ============================================
  5. rem DARK BASIC EXAMPLE PROGRAM 17
  6. rem ============================================
  7. rem This program handles file expressions
  8. rem --------------------------------------------
  9.  
  10. rem Count lines
  11. lines=0
  12.  
  13. rem Read file to screen
  14. open to read 1,"exam17.dba"
  15.     if file open(1)=1
  16.         while file end(1)=0
  17.             read string 1,a$
  18.             print a$
  19.             inc lines
  20.             if lines>30 then cls : lines=0
  21.         endwhile
  22.     endif
  23. close file 1
  24.  
  25. rem User prompt
  26. print "End of File"
  27. print
  28. print "File Size: ";file size("exam17.dba");" bytes"
  29. print
  30. print
  31.  
  32. rem Wait for user keypress
  33. print "Press Any Key"
  34. suspend for key
  35. end
  36.  
  37.