home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 4251 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: ntc.nokia.com!usenet
  2. From: Harald Zottmann <harald.zottmann@ntc.nokia.com>
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Need little C Help! (How to make caracters apear on the same spot again and again?)
  5. Date: Mon, 26 Feb 1996 15:07:58 +0100
  6. Organization: Nokia Group
  7. Message-ID: <3131BEBE.64FB@ntc.nokia.com>
  8. References: <4gjudo$i95@news.xs4all.nl>
  9. NNTP-Posting-Host: silvia.trs.ntc.nokia.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (X11; I; SunOS 5.4 sun4m)
  14.  
  15. Joel Wijngaarde wrote:
  16. > Hello,
  17. > Can somebody tel me how i can make a counter in C wich counts at the same
  18. > screen position. I'm mean something like the in the program 'Lha'. This
  19. > program counts the bytes, that are (un)packed. The number of bytes
  20. > increases on the same spot; NOT like this:
  21. > 1 2 3 4 5 6 7 8 9 10 11 12 etc....
  22.  
  23. Just do it like this:
  24. .
  25. .
  26. printf ("\n");
  27. for (i=0; i < 100; i++)
  28.     {
  29.     printf ("%d  \r",i);
  30.     }
  31. .
  32. .
  33. Note that this may cause troubles under UNIX,
  34. because some UNIX systems won't output their
  35. buffer untit there is the newline sequence "\n".
  36. If i remember right, you have to use the flush()
  37. function then.
  38. The Amiga however doesn't need that stuff.
  39. > Thanks in advance!
  40. > --
  41. > Joel Wijngaarde  (Physics student)                             vasquez@xs4all.nl
  42. > All science is either physics or stamp collecting.
  43. >                 -- E. Rutherford
  44.