ANSI clear screen 
Author Message
 ANSI clear screen

I am just learning C and am looking for a way to clear the screen that
uses ANSI compliant code that will work in UNIX.

I know in DOS I can use clrscr() in conio.h ,but this is not available
in UNIX.

Thank You

Sent via Deja.com http://www.*-*-*.com/
Share what you know. Learn what you don't.



Sun, 02 Dec 2001 03:00:00 GMT  
 ANSI clear screen

Quote:

> I am just learning C and am looking for a way to clear the screen that
> uses ANSI compliant code that will work in UNIX.

> I know in DOS I can use clrscr() in conio.h ,but this is not available
> in UNIX.

The FAQ, at http://www.eskimo.com/~scs/C-faq/top.html,
addresses this question in section 19, question 4.  I used to
use tput clear on a Unix system to clear the screen from the
command line, so system("tput clear"); might work, and the
FAQ has several other suggestions.

But why do you want to clear the screen?  Can't you live with
whatever is on the screen when you want to clear it?  If the
user still wants to look at that, it seems a little rude to clear it.

--
MJSR

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.



Sun, 02 Dec 2001 03:00:00 GMT  
 ANSI clear screen

Quote:

> But why do you want to clear the screen?  Can't you live with
> whatever is on the screen when you want to clear it?  If the
> user still wants to look at that, it seems a little rude to clear it.

> --
> MJSR

Actually, it's part of an assignment "Write a main menu that refreshes
when an item is picked". This is my second week in class and the prof
is a Microsoft guy ( I've gotten {*filter*}ed to the power of UNIX (GNOME,
KDE and X)and really don't want to go back to DOS (win98)) so more the
challenge, right?

Thanks for the help,
Mark

Sent via Deja.com http://www.*-*-*.com/
Share what you know. Learn what you don't.



Mon, 03 Dec 2001 03:00:00 GMT  
 ANSI clear screen

Quote:

>Actually, it's part of an assignment "Write a main menu that refreshes
>when an item is picked". This is my second week in class and the prof
>is a Microsoft guy ( I've gotten {*filter*}ed to the power of UNIX (GNOME,
>KDE and X)and really don't want to go back to DOS (win98)) so more the
>challenge, right?

I'd guess that you'll have more challenges than just clearing the screen,
then.  ANSI C has very little support for displays, so I suggest you look
for some widely-available non-ANSI interface which you could use.

curses might be your best bet, but unfortunately we're not allowed to talk
about that here.  ;-)  comp.unix.programmer ought to be able to help with
the UNIX side of things.



Mon, 03 Dec 2001 03:00:00 GMT  
 ANSI clear screen


Quote:
> I'd guess that you'll have more challenges than just clearing the
screen,
> then.  ANSI C has very little support for displays, so I suggest you
look
> for some widely-available non-ANSI interface which you could use.

> curses might be your best bet, but unfortunately we're not allowed to
talk
> about that here.  ;-)  comp.unix.programmer ought to be able to help

with the UNIX side of things.

Many thanks, I found a lot of informational links there. I'm sure to
have more questions as I lern more. It is a Wonderful service that all
of you at clc offer. Keep up the good work and may your parachute
(threads) be flame-proof.
Mark

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.



Tue, 04 Dec 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Clearing Screen w/out ANSI escape codes

2. clear screen in ANSI C?

3. clear screen in ANSI C

4. I'm a newbie..How to clear the screen in ANSI C

5. clear screen command in ANSI C

6. clearing screen with ANSI C and unix

7. Init Screen w/o Clear Screen

8. Clearing screen before displaying menu

9. clearing screen

10. Clear Screen

11. Help clearing screen

12. clearing the screen

 

 
Powered by phpBB® Forum Software