2 ms·
Yup. But as I understand it @ wasn't available on the terminals used to create C. Likewise #. They were used for later features, once they could actually be typ
by JoeAltmaier 3y ago
Yup. But as I understand it @ wasn't available on the terminals used to create C. Likewise #. They were used for later features, once they could actually be typed. Happy outcome, that there were characters available for fresh features, since C used absolutely everything available on the original (ADM?) terminals.
Another curious thing: Unix came shortly after and was entirely typed with lower case. Because those same terminals had only one font (font ROMs were tiny back then, and expensive). It looked like UPPERCASE but in fact the keyboard produced lowercase. Once better terminals were used to edit the code it was noticed for the first time(?) that it's all be edited as lowercase.
Or so the story went, back in those days, when it was all new.
- trealira 3y agoThat corroborates what I've read. The DEC PDP-11 assembler used the @ symbol for dereferences of registers ("@Rn" or "(Rn)" dereferenced a register, for example). However, in Unix, the terminal convention was to use the @ symbol to delete the current line, and they didn't have a DEC assembler yet, so they used the asterisk (*) instead in B, as well as in the Unix PDP-11 assembler, which was written in B. I'm paraphrasing this Quora post (which lists primary and secondary sources): https://www.quora.com/Why-did-the-developers-of-C-decide-to-use-an-asterisk-instead-of-the-much-more-intuitive-for-pointers https://www.quora.com/Why-did-the-developers-of-C-decide-to-...
- kps 3y ago1963 ASCII was upper-case only, and many early terminals (notably for Unix, including the Teletype 33) were upper case only. `stty lcase`, which maps upper-case input to lower case, existed early — https://www.tuhs.org/cgi-bin/utree.pl?file=V1/man/man2/stty.2 https://www.tuhs.org/cgi-bin/utree.pl?file=V1/man/man2/stty....
- aidenn0 3y agoAs far as I know @ on modern keyboards above the two from the IBM Selectric[1], released in 1961; the Model D and the VT-52 both copied the keyboard layout. The 1963 ASCII draft had @, despite not having lowercase yet. Prior to IBM, it was on at least the Underwood typewriters[2], so it was never quite absent. 1: https://en.wikipedia.org/wiki/IBM_Selectric#/media/File:IBM_Selectric_I_(4).jpg https://en.wikipedia.org/wiki/IBM_Selectric#/media/File:IBM_... Note that the number-row is only different from modern keyboards with the cent-sign being replaced with a caret (the cent-sign was never included in ASCII) 2: https://upload.wikimedia.org/wikipedia/commons/a/a4/Ernest_Hemingway_typewriter.jpg https://upload.wikimedia.org/wikipedia/commons/a/a4/Ernest_H...