atitthaker Posted August 18, 2006 Share Posted August 18, 2006 I am understanding that there is difference between line feed and carriage return but I am not getting the desired output."This is \nsample string."shall printThis is sample string.and"This is \rsample string."shall printThis is sample string.Right?But I am getting next line from the first column only.Plz help... Quote Link to comment Share on other sites More sharing options...
AndyB Posted August 18, 2006 Share Posted August 18, 2006 Think about a typewriter. A line feed moves the print head down. A carriage return moves the print head to the extreme left. A line feed AND a carriage return (\r\n) moves the print head down AND to the left. Quote Link to comment Share on other sites More sharing options...
Jenk Posted August 18, 2006 Share Posted August 18, 2006 now also bear in mind it varies across platforms.*nix is just \nwindows is \r\nand mac is strangely \n\r Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted August 18, 2006 Share Posted August 18, 2006 [quote author=Jenk link=topic=104738.msg417927#msg417927 date=1155904584]and mac is strangely \n\r[/quote]I believe Mac is just \r or have I misunderstood something.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.