Monday, May 17, 2010

Carriage return and Line feed

If I work too much under Linux (x)or Windows and I want to switch to the other operating system I bump into the new line issue.

Here are the actors:

CR - carriage return, ASCII code 10 (or \r) - means that the printer carriage should return at the beginning of the line

LF - line feed, ASCII code 13 (or \n) - means that the printer carriage should be move on next line.

New line - whenever you need to move to a new line (in console or editor)


Windows and Linux treat that new line differently:

Window - the new line is made out of a CR and LF so actually the code for new line is CR+LF (\r\n)

Linux - the new line is a simple line feed = LF (\n)

1 comment:

  1. These suggestions may be read in more detail in our full Can Opener guide toreducing price of|the price of} CNC machined elements. It’s really easy to make use of that we encourage mechanical engineers to make use of it continually as they optimize their designs for price. Whenever you’ve made a brand new} design iteration, simply load each the old and the new new} design into our quoting tool and see if the price is completely different. Instead of conventional, rules-based quoting, we use machine studying algorithms to check your CAD to millions of previously manufactured elements and generate a quote instantly.

    ReplyDelete