Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Dec 3, 2005, 03:26 PM   #1
Fender2112
macrumors 6502a
 
Fender2112's Avatar
 
Join Date: Aug 2002
Location: Charlotte, NC
Send a message via AIM to Fender2112
Simple Question? Clear Screen?

I'm using Xcode to learn C++. So far things are simple and output goes to a command window. What is the command that clears the old junk from this command window?
__________________
Really? Really, really!
Fender2112 is offline   0 Reply With Quote
Old Dec 3, 2005, 03:27 PM   #2
gekko513
macrumors 601
 
gekko513's Avatar
 
Join Date: Oct 2003
clear .... edit: eh ... I was thinking Terminal
__________________
Someone get Nekkid™, now!
gekko513 is offline   0 Reply With Quote
Old Dec 3, 2005, 03:37 PM   #3
bousozoku
Moderator emeritus
 
Join Date: Jun 2002
Location: Gone but not forgotten.
I haven't tried it but you might try an ASCII form feed character, as that used to clear ANSI x.364 terminals.
bousozoku is offline   0 Reply With Quote
Old Dec 3, 2005, 03:51 PM   #4
jaykk
macrumors 6502a
 
Join Date: Jan 2002
Location: AZ
Send a message via AIM to jaykk Send a message via MSN to jaykk Send a message via Yahoo to jaykk
Try this

I think this is what you are looking for - choose Debug -> Clear Logs

Edit : Also, if this is what you are looking for, you can set a preference ( General -> Automatically clear logs). It will clear the command window each time you run the program.
jaykk is offline   0 Reply With Quote
Old Dec 3, 2005, 03:58 PM   #5
gekko513
macrumors 601
 
gekko513's Avatar
 
Join Date: Oct 2003
If you want to clear it manually, there's a small grey X below the vertical scroll bar.
__________________
Someone get Nekkid™, now!
gekko513 is offline   0 Reply With Quote
Old Dec 3, 2005, 04:32 PM   #6
Fender2112
Thread Starter
macrumors 6502a
 
Fender2112's Avatar
 
Join Date: Aug 2002
Location: Charlotte, NC
Send a message via AIM to Fender2112
Using google here's what I think I need.

I need clscr() which in found in #include <conio.h> But this file does not exit in Xcode's version of c++

There is also this command: system ("cls"); but this doesn't work on OS X.

I also found this: clear. But I'm not sure of the syntax.
__________________
Really? Really, really!
Fender2112 is offline   0 Reply With Quote
Old Dec 5, 2005, 11:34 AM   #7
SamMiller0
macrumors member
 
Join Date: Aug 2004
Location: San Jose, CA
Clearing the output in a terminal windows is platform dependent. Look at the using the ncurses library for your project.
SamMiller0 is offline   0 Reply With Quote
Old Dec 5, 2005, 06:53 PM   #8
HiRez
macrumors 601
 
HiRez's Avatar
 
Join Date: Jan 2004
Location: Western US
Using curses ithrough Python it's
Code:
myWindow.clear()
where myWindow is a curses window. You could make a window the size of the screen or
Code:
screen.clear()
might also work directly, I'm not sure. Screen is automatically defined when you use curses.
HiRez is offline   0 Reply With Quote
Old Dec 6, 2005, 07:43 AM   #9
gekko513
macrumors 601
 
gekko513's Avatar
 
Join Date: Oct 2003
Quote:
Originally Posted by Fender2112
Using google here's what I think I need.

I need clscr() which in found in #include <conio.h> But this file does not exit in Xcode's version of c++

There is also this command: system ("cls"); but this doesn't work on OS X.

I also found this: clear. But I'm not sure of the syntax.
Well, clear is the terminal command, so system("clear"); could work.
__________________
Someone get Nekkid™, now!
gekko513 is offline   0 Reply With Quote
Old Dec 6, 2005, 08:18 AM   #10
iMeowbot
macrumors 601
 
iMeowbot's Avatar
 
Join Date: Aug 2003
Just for playing around and learning, you can use the string "\e[H\e[2J" to clear a VT100-style terminal. You're really supposed to use ncurses for that kind of thing, but that's more evil than you probably want to deal with at the start.
iMeowbot is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Simple question: Music "Repeat" button on Lock Screen? HMI iOS 7 3 Jul 10, 2013 02:45 AM
Resolved: Screen too clear. Paddle1 iPhone 41 May 6, 2013 05:02 PM
iPhone: Swipe to clear on lock screen LoLife Jailbreaks and iOS Hacks 11 Mar 23, 2013 04:53 PM
iPhone: Help I need a clear lock screen for 6.1.1 cymolia Jailbreaks and iOS Hacks 1 Feb 24, 2013 09:50 AM
iPhone: Clear lock screen Gabichon Jailbreaks and iOS Hacks 4 Feb 10, 2013 03:28 PM

Forum Jump

All times are GMT -5. The time now is 07:34 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC