Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > re: printf function in C

re: printf function in C
Thread Tools
JH
Junior Member
Join Date: Apr 2001
Location: UK
Status: Offline
Reply With Quote
Jul 5, 2001, 02:57 PM
 
Is there a code for clearing the screen similar to \n for newline, \t for tab etc
that I can use for a program that runs in the terminal window?

Cheers
Jeff
     
Forum Regular
Join Date: Oct 2000
Location: Portland, OR USA
Status: Offline
Reply With Quote
Jul 5, 2001, 03:48 PM
 
Actually clearing the screen varies from terminal to terminal. You could use termcap or curses routines to do it. You could also run the clear command via system(). Finally, you could use a '\f' in an printf, this will do a form-feed which will simulate a clear screen but is not as pretty.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:44 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2