clear源代码,有人能解释吗?
#include <linux/unistd.h>int main(void)
{
write("\033[1;1H\033[2J",10);
return 0;
} "\033[1;1H\033[2J" is called a escape secquence. as old terminals are connected through serial cable which can only transmit ASCII codes.
special controls such as clear screen is sent though a escape secquence.(a esc key(27) followed by secquence of ASCII code . 谢谢!!!! i can not read any of them,i think i must study hard and learn more!
页:
[1]