PrefaceWhen you debug a program under a Linux terminal, you sometimes need to output a lot of information. If you can control the color and display of the font, you can make the output information sharp contrast, easy to observe the data during
Printf output font color favoritesSometimes, in order to enable the font color and generate a simple flickering function when the terminal outputs, close up the following codeImplements the hello World color output, and generates a flickering
When debugging a program, sometimes a large amount of data needs to be output. If you want printf/fprintf to change the color of the output data, it is much easier to observe the data. The Character Color of the terminal is controlled by escape
Printf ("/033 [text background color; font color M string/033 [0 m ");
Printf ("/033 [41; 32 m font background is red, the word is green/033 [0 M/N ");41 is the background color, 32 is the font color, the font background is red, the word is green is
When debugging a program, sometimes you have to output a lot of data, if you let printf/fprintf change the color of the output data, it is much easier to observe data.The character color of terminal is controlled by escape sequence, and it is the
The color of the terminal character is controlled by the escape sequence, which is the system display function in the text mode, regardless of the specific language.The escape sequence starts with the ESC and can do the same with \033 (the ASCII
I. printf Functions
This is a function declared in stdio. H. Therefore, you must add # include before using it to output data to standard output devices (such as screens ).1. Usage
printf("Hello, World!");
The output result is:
2> printf (string,
This article introduces echo, print, print_r, printf, sprintf, and var_dump. For more information, see. 1. define echo and use the PHPecho () function to output one or more string methods.
This article introduces echo, print, print_r, printf,
Php echo, print, print_r, printf, sprintf, var_dump usage introduction. This article introduces echo, print, print_r, printf, sprintf, and var_dump. For more information, see. I. definition and usage of echo: The PHPecho () function outputs one or
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.