PDA

View Full Version : Xcode - clear screen!




Fender2112
Feb 6, 2006, 07:30 PM
"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



iSee
Feb 7, 2006, 02:02 PM
Yay! One minor annoyance in my life, gone!
Thanks for taking the time to post this...

Soulstorm
Feb 7, 2006, 02:07 PM
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.