Xcode - clear screen!

Discussion in 'Mac Programming' started by Fender2112, Feb 6, 2006.

  1. macrumors 6502a


    Aug 11, 2002
    Charlotte, NC
    "What is the clear screen command for Xcode?" Since I started back learning to program about a year ago, I have seen this question pop up several times. When you use the proper command, at least for c++, Xcode will give you a "Term environment error" of some sort. If you run the program from Terminal, the system("clear"); command works fine.

    If you're like me, I'm not fimiluar with Terminal and would perfer the Xcode log window to clear each time a run a program. There is a small "x" at the lower right corner of the log window that will clear the screen, But that's an extra click I can do without. Fret no more, I discovered a few moments ago that there is a preference setting that clears the log automatically. I am so over joyed that had to share this with everyone who has ever felt my pain.

    From the Xcode menu: Preference > General > Environment put a check where is says "Automatically clear log".

    I can rest better now. :D
  2. macrumors 68040


    Oct 25, 2004
    Yay! One minor annoyance in my life, gone!
    Thanks for taking the time to post this...
  3. macrumors 68000


    Feb 1, 2005
    Some more info here...

    Although the Xcode compiler emulates the terminal's commands, it hasn't yet implemented the commands for the clear screen. As such, the command system("clear"); will not work in Xcode, but it will work in the Terminal, and it will clear the screen.

Share This Page