guy@sun.uucp (Guy Harris) (06/28/85)
> 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
chris@umcp-cs.UUCP (Chris Torek) (06/30/85)
More ``credit where credit is due dep't'': wasn't the sane-tty-echo done by IIASA, whatever that really means? (For some reason the back of my brain is whispering ``Australia''....) (By the way, sane tty echoing does not imply sane code to do it! :-) ) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251) UUCP: seismo!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@maryland
henry@utzoo.UUCP (Henry Spencer) (07/02/85)
> 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)... Remember what system KLT and DMR had been working on immediately before the development of Unix. Their fingers were very definitely trained for Multics typing conventions. -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,linus,decvax}!utzoo!henry
gwyn@brl-tgr.ARPA (Doug Gwyn <gwyn>) (07/05/85)
> > 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)... > The older UNIXes in cooked mode would echo everything one typed, including control characters. About the only safe characters to use for "magic" things were printable characters such as \ # @. This works out better on hardcopy terminals, too, which is what most of the original UNIX terminals were.
guy@sun.uucp (Guy Harris) (07/08/85)
> > > 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)... > > > The older UNIXes in cooked mode would echo everything one typed, > including control characters. About the only safe characters to > use for "magic" things were printable characters such as \ # @. > This works out better on hardcopy terminals, too, which is what > most of the original UNIX terminals were. OK, then, we rephrase the question as "why did the older UNIXes echo everything one typed?" The DEC OSes which echoed things sanely already existed - they even handle hardcopy terminals about as well as one can (they echo the characters being erased between backslashes). The policy of echoing things blindly also forced the policy of suppressing the output of the EOT character, which policy tends to upset certain terminals which accept positioning information in the form of 7-bit binary numbers (yes, that's dumb, but those terminals do exist and we had to deal with them at CCI). Guy Harris
henry@utzoo.UUCP (Henry Spencer) (07/11/85)
> ... The policy of > echoing things blindly also forced the policy of suppressing the output of > the EOT character... In case people are interesting in knowing *why* EOT had to be suppressed, it's because some communications-oriented terminals power themselves down when they get an EOT. The idea is to let the terminal sit on something like a Telex line in "standby" mode, with the moving parts powered up only when there is actually an incoming message. The first Unix machine I worked with had such a terminal (a GE Terminet 1200) as its console. Back before we got Unix, there was a little competition going for a while to see who could write the most thorough shutdown program under RT11. Such programs typically cleared memory, write- protected the disks, powered down the console terminal, and then halted the CPU after doing a tricky little dance so that all the console lights would be out when the halt went into effect. -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,linus,decvax}!utzoo!henry