home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / pascal / 7830 < prev    next >
Encoding:
Internet Message Format  |  1993-01-04  |  1.4 KB

  1. Xref: sparky comp.lang.pascal:7830 comp.sys.ibm.pc.programmer:733
  2. Newsgroups: comp.lang.pascal,comp.sys.ibm.pc.programmer
  3. Path: sparky!uunet!uunet.ca!geac!zooid!r-node!shadow
  4. From: shadow@r-node.pci.on.ca
  5. Subject: Turbo Pascal: Graphical Bar
  6. Followup-To: comp.lang.pascal
  7. Organization: Mylic
  8. Date: Sun, 3 Jan 1993 04:57:27 GMT
  9. Message-ID: <1993Jan3.045727.1920@r-node.pci.on.ca>
  10. Lines: 21
  11.  
  12. I'd like to know how to write a routine for displaying a "graphical
  13. representation bar (G.R.B.)".  A G.R.B. is one that displays the progress
  14. of how much longer a task would take to finish certain work.
  15.  
  16. Here's an example of a graphical representation bar:
  17.  
  18.                  0                 50%                 100%
  19.                 [***************.........................]
  20.  
  21. Here's the question.  Let's say the program reads in a variable size file
  22. for input, one line at a time, until End-Of-File.
  23.  
  24. How could I write a routine to display the progress of reading this file?
  25.  
  26. I probably first get the size of the file, which represents 100%.  But how
  27. would I calculate each input line as a percentage of the total size?
  28. -- 
  29.         ______                shadow@r-node.gts.org
  30.        | |__| |   If it's there and you can see it       - it's real
  31.        |  ()  |   If it's there and you can't see it     - it's transparent
  32.        |______|   If it's not there and you can't see it - you erased it!
  33.