home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / amiga / programm / 13266 < prev    next >
Encoding:
Text File  |  1992-09-11  |  1.6 KB  |  51 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!gatech!concert!sas!mozart.unx.sas.com!jamie
  3. From: jamie@cdevil.unx.sas.com (James Cooper)
  4. Subject: Re: Clrscr(); on AMIGA.
  5. Originator: jamie@cdevil.unx.sas.com
  6. Sender: news@unx.sas.com (Noter of Newsworthy Events)
  7. Message-ID: <BuF5LB.6JC@unx.sas.com>
  8. Date: Fri, 11 Sep 1992 14:58:23 GMT
  9. References:  <dsaban.4.716206893@cs1.uct.ac.za> <BuF5Ax.65D@unx.sas.com>
  10. Nntp-Posting-Host: cdevil.unx.sas.com
  11. Organization: SAS Institute Inc.
  12. Lines: 37
  13.  
  14.  
  15. In article <BuF5Ax.65D@unx.sas.com>, jamie@cdevil.unx.sas.com (James Cooper) writes:
  16. >
  17. >In article <dsaban.4.716206893@cs1.uct.ac.za>, dsaban@cs1.uct.ac.za (D SABAN) writes:
  18. >>I'm studying C on the IBM.  I would like to transfer some of the files I'm
  19. >>writing to the Amiga, unfortunately it seems that Clrscr(); only works on
  20. >>the IBM.
  21. >>
  22. >>Does anyone know the equivalent of Clrscr(); for the amiga.
  23. >
  24. >Sure:
  25. >
  26. >        1) printf("\f");                /* FormFeed clears screen */
  27. >
  28. >                or
  29. >
  30. >        2) printf("\x9b[H\x9b[J");      /* ANSI: home cursor, clr scr */
  31. >
  32. >There are others, but they start getting odd, such as a SetRast(rp,0);
  33. >on the current window, etc.
  34.  
  35. Yeep!!!  Glad I saw this before anyone else...
  36.  
  37. In option 2 above, you don't need the '[' characters, since you're using
  38. '\x9b', the CSI character.  It should be:
  39.  
  40.         2) printf("\x9bH\x9bJ");        /* ANSI: home cursor, clr scr */
  41.  
  42. Sorry for any confusion... :-(
  43.  
  44. -- 
  45. ---------------
  46. Jim Cooper
  47. (jamie@unx.sas.com)                             bix: jcooper
  48.  
  49. Any opinions expressed herein are mine (Mine, all mine!  Ha, ha, ha!),
  50. and not necessarily those of my employer.
  51.