Hi everyone
I got this line of code.
printf ("\033[2J\033[1;1H");
My program is working with rs232 terminal.
Can someone help me understand what does this line do?
I know it clears the screen.. but how exactly?
Thanks!
Printable View
Hi everyone
I got this line of code.
printf ("\033[2J\033[1;1H");
My program is working with rs232 terminal.
Can someone help me understand what does this line do?
I know it clears the screen.. but how exactly?
Thanks!
\033 is an octal escape sequence, which evaluates to the ESC character code (decimal 27)
The \033[ pair is known as a CSI
ANSI escape code - Wikipedia, the free encyclopedia
You need a terminal which understands these sequences if you want to observe the intended effects, otherwise you just see random garbage printed on screen.