clear screen

This is a discussion on clear screen within the C Programming forums, part of the General Programming Boards category; Earlier, I was doing a little bit of scanning through the boards ( search feature ) and I was blown ...

  1. #1
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765

    Talking clear screen

    Earlier, I was doing a little bit of scanning through the boards ( search feature ) and I was blown away by the amount of clear screen posts.

    Anyways, I have been able to get all sorts of ways to work for me since the first time I tried. I have a question though.

    Which is better, A, B, or C?

    Code:
    A.
    system("cls");
    
    B.
    clrscr();
    
    C.
    spawnl(P_WAIT, "cls", NULL);
    System, is slow, right? Alot of you say system crawls. Will CLS's speed change if you send it through spawn?
    The world is waiting. I must leave you now.

  2. #2
    Registered User Nutshell's Avatar
    Join Date
    Jan 2002
    Posts
    1,020
    Would you mind telling me what is spawnl ?

    thnx

  3. #3
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765
    The world is waiting. I must leave you now.

  4. #4
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765
    Hm, my version of spawnl doesn't work. Spawn is used for executing programs. Quite possibly you can't do what I was trying ....
    The world is waiting. I must leave you now.

  5. #5
    Registered User stautze's Avatar
    Join Date
    Apr 2002
    Posts
    195
    Both of A and B are great if you compile in DOS, but I think most of the questions come from UNIX people.

    There ain't no easy way in UNIX, so I think clearscreen is still a legitimate question for people even after reading the FAQ because the only solution given is to throw out the monitor, print '\n' (which is a joke...i think), or use curses.

  6. #6
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >Which is better, A, B, or C?
    What about D: None of the above?
    A) Nasty
    B) Nonstandard
    C) Nonstandard

    >so I think clearscreen is still a legitimate question for people even after reading the FAQ
    The best answer is that you rarely need to clear the screen, if ever.

    -Prelude
    My best code is written with the delete key.

  7. #7
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765
    Ok Prelude, what is your prefered way of doing it, when you have to?
    The world is waiting. I must leave you now.

  8. #8
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    When I have to it's something to do with these boards, so I use the Windows API option from the FAQ.

    -Prelude
    My best code is written with the delete key.

  9. #9
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765
    That's the only one I use.
    The world is waiting. I must leave you now.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. CLear Screen Routine
    By AQWst in forum C++ Programming
    Replies: 4
    Last Post: 12-13-2004, 07:24 PM
  2. i am not able to figure ot the starting point of this
    By youngashish in forum C++ Programming
    Replies: 7
    Last Post: 10-07-2004, 02:41 AM
  3. Getting a clear screen...
    By Finchie_88 in forum C++ Programming
    Replies: 13
    Last Post: 09-03-2004, 05:38 PM
  4. Clear Screen Again!!!
    By trang in forum C Programming
    Replies: 3
    Last Post: 12-13-2003, 07:36 AM
  5. Yet another clear screen thread :D
    By kermit in forum Linux Programming
    Replies: 2
    Last Post: 11-20-2003, 04:14 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21