RIP Rhonie
- July 23rd, 2008
- By jrod
- Write comment
Archive for July, 2008
A simple program that demonstrates one way to clear the screen using ANSI/VT100 terminal control escape sequences
#include <stdio.h>
int
main(){
printf("\x1b[2J\x1b[H");
return 0;
}
(ESC)[2J = Erase screen and set cursor to home
(ESC)[H = return cursor to home (seems redundant but is necessary for some VT’s)