The following message is a courtesy copy of an article that has been posted to bit.listserv.ibm-main as well.
[EMAIL PROTECTED] (Tsai Laurence) writes: > I am confused that the difference between LF & NL ? It seems both > will get the printer prints the document on next line . Can anybody > advise me ? from rfc index http://www.garlic.com/~lynn/rfcietff.htm rfc 318 telnet protocol http://www.garlic.com/~lynn/rfcidx1.htm#318 318 [Ad hoc Telnet Protocol], Postel J., 1972/04/03 (23pp) (.txt=34928) (Updated by 435) (Updates 158) (Ref'ed By 739, 750, 755, 758, 762, 770) clicking on the ".txt=" field in rfc summary retrieves the actual rfc from rfc 318 ... Telnet defines the end of a line to be indicated by the ASCII character pair CR LR. Several of the real devices in the world have only a single new line (NL) function. Several of the computer systems have in some programs used the CR and LF functions to have semantic meaning larger than the format effect they provide. Further, several computer systems allow the CR and LF functions to be used separately (e.g., such that a line may be overprinted). One problem, for those Telnet (user) programs required to map the NVT into a device which only has a NL function, is how is the CR LF to be dealt with. One solution is to examine the character following the CR. If an LF is found, then perform the NL function; if anything else is found then back space to the beginning of the line. Another problem is the case of a computer system which locally uses period, ".", to cause the new line function and which uses, in some programs, CR and LF for semantically significant operations. Suppose the user Telnet sends the sequence CR LF. Does this mean "new line" or the "CR operation" followed by the "LF operation "? A solution to this problem it to require that Telnet programs send a CR NOT intended to be part of a CR LF pair as a CR NUL pair. Then the receiving program can always hold a CR and examine the next character to determine if a new line function is intended. This solution is strongly recommended. ... and .. Line Feed (LF) 10 Moves the printer to next line (keeping the same horizontal position). Carriage Return (CR) 13 Moves the printer to the left margin of the current line. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

