Quote:
|
Originally Posted by Fat Alex
So whats the difference between "\r" and "\n" ?
|
the difference is three!
well that is if you subtract them in the code.
Each character has a different value.
"\n" is equivilent to character 10. so if you were to do char a=10, it would be the same as char a='\n'
"\r" is equivilent to character 13. so if you were to do char a=13, it would be the same as char a='\r'
So the difference is 13 - 10, and you would get three.
\r (carriage return) means to go the beginning of the line, and \n (line feed) means to go to the next line.