Gustav Brock
Gustav at cactus.dk
Sun Dec 10 11:00:50 CST 2006
Hi Susan That is true as it makes no sense for Windows to "type over" the same line once again. You did that on matrix and type-wheel printers for underlining words - it now seems so many years away ... /gustav >>> ssharkins at setel.com 10-12-2006 17:37 >>> Well, what I've noticed is that vbCr not only returns the cursor to the left margin, but also begins on a new line -- is this true or not, because it seems to be what I'm seeing. Susan H. Hi Susan Further to Bruce's explanation, note that the sequence always must be CR+LF in the DOS and Windows world. That means Chr(13) & Chr(10) which can be hard to remember even if you use the constant vbCrLf. And in SQL the constant cannot be used, so you have to learn. To simplify things, MS introduced the "clear language" constant vbNewLine which in Windows equals vbCrLf but is easier to remember. What complicates matters is that the Unix and Linux world uses only a LF for a new line while the old Mac OS used CR only. This means that a text file created in Unix or an old Mac may - when viewed in Windows - not display as intended. More fun here: http://en.wikipedia.org/wiki/Newline /gustav >>> bhjohnson at verizon.net 10-12-2006 06:26 >>> They are literally holdovers from the typewriter days when the carriage holding the paper moved back and forth in front of the keys. As you typed, it moved one space at a time from right to left (on Western typewriters). When you got to the end of a line (judge by eye), you had a big lever on the left side of the carriage which you'd push to the right. This moved the paper up one line (could be adjusted on most typewriters to 1, 1.5 or 2 lines) and pushed the carriage back to the left where the next line started. Especially earlier mainframe (were there any other kind?) printers copied the mechanism. A line feed -- chr$(10) -- moved the paper up one line. The next character to print would be one space to the right of the last one only one line below. The carriage return -- chr$(13) -- moved the head or print position to the left margin; just like the typewriter did. Most PC systems usually could care less what terminates the lines in a text/data file. By convention, it's both a line feed and carriage return. Visual Basic/VBA even have constants for them; vbCrLf and wdCrLf. Mainframes frequently use only one character as a line terminator. Depends on the flavor. HTH Bruce H. Johnson Sylmar, CA -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Susan Harkins Sent: Saturday, December 09, 2006 3:05 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] difference between linefeed and carriage return I can't really tell the difference between a linefeed and a carriage return -- I'm sure there is one. Can someone explain the differences between them? Susan H.