9

The ASCII horizontal tab character defaults to 8 columns, which is unfortunate because it's too wide for indenting block structured languages (at least to most people's taste, acknowledging Linus Torvalds as a counterexample) and too narrow for columnar text such as assembly language. Looking for how this came about, I found https://en.wikipedia.org/wiki/Tab_key#Tab_characters

Originally, printer mechanisms used mechanical tab stops to indicate where the tabs went. This was done horizontally with movable metal prongs in a row, and vertically with a loop of mylar or other tape the length of a page with holes punched in it to indicate the tab stops. These were manually set to match the pre-printed forms that were loaded into the printer. In practice, settable tab stops were rather quickly replaced with fixed tab stops, de facto standardized at every multiple of 8 characters horizontally, and every six lines vertically. A printing program could send zero or more tabs to get to the closest tab stop above and left of where it wanted to print, then send line feeds and spaces to get to the final location. Tab characters simply became a form of data compression.

Despite five characters were the typical paragraph indentation on typewriters at that time, the horizontal tab size of eight evolved because as a power of two it was easier to calculate with the limited digital electronics available...

When did this come about, that the fixed tab stops were de facto standardized at 8 characters horizontally?

8
  • 4
    I remember that on Epson-compatible printers, there was a command to set up the tabs to certain columns (like on a typewriter), so I'd guess the conventions "tabs every 8 columns" and "tabs mean something else" did co-exist for some time.
    – dirkt
    Commented Sep 13, 2020 at 10:35
  • 2
    As a non-answer, I note the Flexowriter, the ur-console terminal, had mechanically-set tab stops.
    – dave
    Commented Sep 13, 2020 at 13:03
  • 2
    @dirkt You can also set the tabs arbitrarily on xterm and compatible terminals, so it still co-exists.
    – user722
    Commented Sep 13, 2020 at 14:04
  • 1
    @dirkt It did. Depending on how much money one spend on a typewriter.
    – Raffzahn
    Commented Sep 13, 2020 at 15:17
  • 1
    The ASR-33s I used had no tab capability (even though the I-key was labelled TAB, and ctrl-I sent 011) - it had to be simulated in the OS. On the other hand, the user guide for the multi-access system I used does not mention TAB, so we probably hand-indented our code with spaces.
    – dave
    Commented Sep 13, 2020 at 16:05

1 Answer 1

8

I believe the only way we can answer this question is by members finding 'the earliest' such description.

DEC's first CRT terminal device, the DEC VT05 terminal (1970), had tab stops fixed at 8-character intervals.

The DEC VT50/VT52 terminals (1974) had tab stops fixed at 8-character intervals.

The DEC VT100 terminal, (1978) which replaced the VT52, had tab stops that were settable by firmware or by program action. Thus giving rise to a whole new class of problem ("my layout is messed up" -> "your tab setup is wrong")


For software, the scanner service (terminal driver) of TOPS-10 4.5 from 1969 emulates tab stops by outputting spaces to the next 8-character positions; see label CONTI2 on page 65.

I'd be willing to bet the same thing happened on the earlier PDP-6, but have no evidence.

4
  • 1
    I suspect (but have no evidence) the actual origin might be the typewriter. I dimly recall an ancient typewriter from my youth where a tab was 8 spaces.
    – abligh
    Commented Sep 13, 2020 at 18:22
  • 5
    I only ever saw typewriters with settable stops (set by moving a chunk of metal on a rack).
    – dave
    Commented Sep 13, 2020 at 19:34
  • 2
    Ditto what @another-dave said: Typewriters that I used had keys labelled "TAB SET" and "TAB CLR" that set or cleared a tab stop at the current carriage position. (incimages.com/uploaded_files/image/1920x1080/…) They worked by sliding little metal bits up or down in a bar that ran the length of the carriage: 1.bp.blogspot.com/-BRwo6vv9bt8/VVbQhLsFf5I/AAAAAAAAkyw/… . The tabs often were exposed at the back of the machine, and you could quickly clear them all by mashing the metal bits down with your fingers. Commented Sep 13, 2020 at 21:24
  • 1
    Perhaps the origin of 8th-column tab stops can still be traced back to typewriting, even if this wasn't a mechanically imposed default. Is it possible that widely used typing manuals or style guides recommended tab stops at every eight columns, and so the practice caught on this way?
    – Psychonaut
    Commented Sep 14, 2020 at 11:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .