Line terminators
Line terminators are used to mark the end of a line of source text. Different operating systems use different characters or character sequences to mark the end of a line.
The following terminators are used on various operating systems:
Operating System | Line Terminator |
Mac OS X | ASCII Carriage Return (0x0D) |
UNIX | ASCII Newline (0x0A) |
Linux | ASCII Newline (0x0A) |
Windows | ASCII Carriage Return (0x0D) followed by ASCII Newline (0x0A) |
In general, any number of line terminators can be used between any two symbols in a program and they are treated the same as other white space. A line terminator appearing at the end of an end-of-line comment terminates the comment.