Http://www.cnblogs.com/dartagnan/archive/2010/12/14/2003499.html Linux and Windows carriage return line break
Source:
"Carriage Return" vs "line feed)Before the computer appeared, there was a kind of device called teletype model 33, which can contain 10 characters per second. But there is a problem, that is, when a line breaks a line, it takes 0.2 seconds, just two characters. If a new character is passed in the 0.2 s, the character will be lost.As a result, the developers thought of a way to so
What is the difference between \ R and \ n, how should I use it when coding?Difference:
\ r:
Full Name: Carriage return (carriage is "word car" meaning, a part of the printer)
Abbreviation: Return
Abbreviation: R
ASCII code: 13
Action: Moves the cursor to the far left of the current line
\ n:
Full Name: New line
Alias: Line Feed
Abbreviation: n
ASCII code: 10
Action: Move the cursor down one line
What is the difference between \ R and \ n, and how it should be used when coding, let's take a look at it below.
Difference:
\ R:Full Name: Carriage return (carriage is "word car" meaning, a part on the printer)Abbreviation: ReturnAbbreviation: RASCII code: 13Function: Move the cursor to the left of the current line
\ n:Full Name: New lineAlias: Line FeedAbbreviation: nASCII code: 10Action: Move the cursor down one line
How different operating systems represent "carriage return + newline" (
document) with VIM or gedit under Linux (or a new. C document, which can be browsed in Windows with VC6.0!). )。 To open it, you can also enter the command directly: (Note that if the file name is Chinese, it may not be found, you need LS, then copy the file name, and then gedit paste the file name) Gedit Xx.doc or Vim Xx.doc (not recommended, VIM may not support traditional Chinese characters) or directly find the file, click, Open Office, select Character Set (System), character (SYSong18030),
Difference:
\ R:
full name: Carriage return (carriage is" The word car "means, A part on the printer)
abbreviation: R
ASCII code:
action: Move the cursor to the leftmost
on the current line
\ n:
Full Name: New line
Alias: Line Feed
Abbreviation: n
ASCII code: 10
Action: Move the cursor down one line
how different operating systems represent "carriage return + newline" (that is, the end of
1. The origin of carriage return and line feed
First, clarify two concepts:
Press ENTER Cr-move the cursor to the beginning of the current row.Wrap lf-move the cursor vertical to the next line. (Instead of moving to the beginning of the next line, that is, do not change the horizontal position of the cursor)
Before the computer appeared, there was a kind of thing called teletype model 33, which also came from the TTY concept in Linux/Unix. It can contain 10 characters per second. But ther
Cr: carriage return: return the front of the typewriter. Corresponding \ RLF: line feed, typewriter rolling down a line. corresponding to the \ n typewriter era, these are instructions for directing typewriter mechanical work, the computer era is only displayed on the screen. Cr + LF is a standard line break for text f
Why does the carriage return record come from:
Before the appearance of PC, secretaries used typewriter to print documents. (Brother is the most famous product version ).
The typewriter is printed with a lead character, and its keyboard is arranged in the same way as the current PC keyboard.
(In view of people's habits, the keyboard layout of typewriter keyboard
Enter key, that is, the entry on the keyboard, is a more useful key, in the text editing, enter the role of the return line, in the input URL when the key role is "go", in the implementation of the DOS command, the role of the Enter is to perform ... On the standard keyboard, there are 2 return keys, one on the right side of the main keyboard area, the top of the SHIFT key (pictured below), one on the lower-right corner of the keypad, and below the plus key.
History of the Enter key
About the
2012-10-20 Noip Demo Game
by COOLYANGZC
A total of 3 questions, time 3 hours
Topic name
Advanced Typewriter
Unequal series
Management and development
source file
Type.cpp/c/pas
Num.cpp/c/pas
Exploit.cpp/c/pas
Input file
Type.in
Num.in
Exploit.in
Output file
Type.out
Num.out
Exploit.out
Time limit
1000MS
1000MS
1000MS
Memor
, and some lines separated by a number of hyphens (---).It can be thought that paste is similar to cat, paste horizontally combining data, while cat vertically combines data. Paste can also add the-d parameter to specify delimiters, such as paste-d ' |% ' ... will be used in turn | and% delimited data columns.18th Chapter Filters: Statistics and formattingCreate line number: NL [-v start] [-I increment] [-B A] [-n]View invisible characters in VI using the command:: Set list, closed with: Set nol
Before you implement the progress bar, learn the makefile first.There are countless source files in a project, which are placed in several directories by type, function and module, and makefile defines a series of rules to specify which files need to be compiled first, which files need to be compiled, which files need to be recompiled, and even more complex functional operations. Make is a command tool that is a command tool that interprets instructions in makefile.Beginners can only implement
you can browse with VC6.0 in Windows.) )。 To open the command can also be entered directly: (Note that if the filename is Chinese, it may not be found, need LS, and then copy the filename, and then gedit paste the file name)
Gedit Xx.doc
or Vim Xx.doc (not recommended, VIM may not support traditional characters)
or directly find the file, click, Open Office, select the character set (System), character (SYSong18030), language (Simplified Chinese), change paragraph:
1. Crlf, that is, \ r \ n, th
The difference between Linux and Windows return line break
source of the problem: "Carriage return" (carriage return) VS "line feed"Before the computer appeared, there was a gadget called a telex typewriter (teletype Model 33) that could play 10 characters per second. But it has a problem, that is, when the line is finished, it will take 0.2 seconds to hit two characters. If there are new characters coming in this 0.2 seconds, then this character wil
At the beginning of the concept is only a little vague, not too concerned about, the results of a search only found that this thing is too interesting, not only has an interesting story, but also has a lot of doorways, but also brought up some of the previous memories, the original previously also dealt with this problem.1 Basic Concepts
Control characters
Original meaning
Line break
\ n
NewLine
LF (line Feed)
The cursor go
Line breaks in Linux and Windows
Carriage Return and line feed generate background
The origins and differences between carriage return and line feed.Before the computer appeared, there was a kind of device called teletype model 33, which can contain 10 characters per second. But there is a problem, that is, when a line breaks a line, it takes 0.2 seconds, just two characters. If a new character is passed in the 0.2 s, the character will be lost.As a result, the developers thought of a way to sol
Http://casec12.javaeye.com/blog/523160
Today, I have finally figured out the origins and differences between carriage return and line feed.Before the computer appeared, there was a kind of device called teletype model 33, which can contain 10 characters per second. But there is a problem, that is, when a line breaks a line, it takes 0.2 seconds, just two characters. If a new character is passed in the 0.2 s, the character will be lost.
As a result, the developers thought of a way to solve this p
they have already visited. They open an article or a book, usually reading one or two pages, and then jump to another place. The report said: "It is obvious that users are not reading online in traditional ways. On the contrary, there are signs of a new 'read' method: users browse the titles, content pages, and summaries in a massive manner to get results quickly. It is almost considered that they are surfing the Internet to avoid reading in the traditional sense ."
directories, because the "bin" directory is usually added to the user's path.They can use the program normally. Therefore, the running script usually runs well in the bin.
Tty
In Linux, tty may be the most confusing term related to the terminal. Tty is an old abbreviation of teletype. Teletypes, orTeletypewriters, originally referred to as a telex typewriter, is reading and sending information via a printer keyboard through a serial line. It is not v
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.