Microsoft KB Archive/41039

ENTER Key Gives Linefeed in XENIX, Carriage Return in MS-DOS

PSS ID Number: Q41039 Article last modified on 04-20-1993

2.00 2.10 2.20 | 2.10 2.20 MS-DOS | XENIX

Summary: Under the XENIX operating system, pressing the ENTER key returns a newline character (linefeed, LF, ASCII value of decimal 10), which tells the program to terminate input on a line. In contrast, under the MS-DOS operating system, pressing the ENTER key returns a carriage return (CR, Decimal 13) as the termination character. This difference between operating systems is invisible to COBOL programs. The ENTER key terminates ACCEPT statements in COBOL programs for both XENIX and MS-DOS. This difference between operating systems is noticeable in BASIC when using the INKEY$ function to return the value of the ENTER key. (For more information, query on the keywords CARRIAGE RETURN and XENIX BASIC).

Additional reference words: 2.00 2.10 2.20 Copyright Microsoft Corporation 1993.