Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp Path: utzoo!watmath!clyde!bonnie!akgua!whuxlm!harpo!decvax!decwrl!sun!guy From: guy@sun.uucp (Guy Harris) Newsgroups: net.unix Subject: '#' as comment character vs. '#' as erase character Message-ID: <2360@sun.uucp> Date: Fri, 28-Jun-85 02:32:34 EDT Article-I.D.: sun.2360 Posted: Fri Jun 28 02:32:34 1985 Date-Received: Mon, 1-Jul-85 06:29:00 EDT References: <291@ucdavis.UUCP> <2401@pegasus.UUCP> Distribution: net Organization: Sun Microsystems, Inc. Lines: 25 > A better question is why the '#' character was used as a comment character > when the typical UNIX*TM Operating System came with '#' as the default > character-delete character? The first publicly available Bourne shell that used '#' as a comment character came with 4.1BSD (or maybe an earlier release). Most users of Berkeley UNIX set their delete character to RUBOUT (or maybe BACKSPACE in some cases). The 4.xBSD terminal driver not only handles "crt rubout" correctly (i.e., it erases *all* the spaces generated by a tab), but it can also handle rubout in the style of DEC OSes on hardcopy terminals, so it encourages use of non-printing characters. A couple of even better questions are: 1) Why was '#' chosen both as the default erase character and the preprocessor line flag for C? 2) Why were the '#' and '@' characters used as editing characters, other than nostalgia for Multics (which used lots of weird IBM 2741 printing terminals over half-duplex lines, and couldn't do much better), when the DEC OSes (which supported full-duplex ASCII terminals) *already* had a relatively sane convention for handling rubout both on printing terminals and CRTs? Guy Harris