function stripcr() "pan" <[EMAIL PROTECTED]> wrote: From: Dave Watts <[EMAIL PROTECTED]> > > It can't be too stupid a question, because I don't really know what it is. I > believe it's an instruction to the printer to move to the next line, but > given that's what a carriage return is as well, I don't have a good answer. > In Windows, text files usually end each line with a carriage return > (Chr(13)) followed by a line feed (Chr(10)). Text files in Unix, on the > other hand, typically do without line feeds; when you open up a text file > created in Unix in Notepad, you'll see all these little black "unprintable > character" squares - carriage returns without line feeds. > Unix uses 'newline' to delimit lines. Text paragraphs get orthographically presented 'correctly' because unix environments drop the cursor down one line for each newline char. MSDOS/etc uses 'linefeed' + 'carriage return' (chr10, chr13 respectively). This is modelled almost like how a platen is controlled in a typewriter. When you operate the handle at the end of the typewriter you are both actuating a lever that rolls the platen back one line and the horizontal pulling on that same lever returns the carriage to the first printing position. Thus, 'linefeed' and 'carriage return'. newline==linefeed without linefeed chars but with cr all lines get "printed" on the same line without cr but with linefeed all lines get run together as one long line Those uprintable chars you see in a DOS environment trying to display a unix file are linefeeds - without an associated cr there is only one line as far as DOS is concerned - only wraps and display limts forces any formatting. You can see this by looking at an unix file in DOS by dragging the dimensions of the window - the unix file will fill the window much like water seeking its own level - a chr10+chr13 delimited file will show the same line formatting no matter the size of the window. It is all about using certain characters as controls to move the cursor. Thus 'control characters' :) Pan ------------------------------------------------------------------------------ Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. ____________________________________________________________________ Get free email and a permanent address at http://www.netaddress.com/?N=1 ------------------------------------------------------------------------------ Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebarRsts&bodyRsts/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

