What is a vertical tab?

后端 未结 10 1199
醉酒成梦
醉酒成梦 2020-12-02 06:17

What was the original historical use of the vertical tab character (\\v in the C language, ASCII 11)?

Did it ever have a key on a keyboard? How did some

相关标签:
10条回答
  • 2020-12-02 06:25

    Vertical tab was used to speed up printer vertical movement. Some printers used special tab belts with various tab spots. This helped align content on forms. VT to header space, fill in header, VT to body area, fill in lines, VT to form footer. Generally it was coded in the program as a character constant. From the keyboard, it would be CTRL-K.

    I don't believe anyone would have a reason to use it any more. Most forms are generated in a printer control language like postscript.

    @Talvi Wilson noted it used in python '\v'.

    print("hello\vworld")
    

    Output:

    hello
         world
    

    The above output appears to result in the default vertical size being one line. I have tested with perl "\013" and the same output occurs. This could be used to do line feed without a carriage return on devices with convert linefeed to carriage-return + linefeed.

    0 讨论(0)
  • 2020-12-02 06:25

    In the medical industry, VT is used as the start of frame character in the MLLP/LLP/HLLP protocols that are used to frame HL-7 data, which has been a standard for medical exchange since the late 80s and is still in wide use.

    0 讨论(0)
  • 2020-12-02 06:25

    I believe it's still being used, not sure exactly. There might be even a key combination of it.

    As English is written Left to Right, Arabic Right to Left, there are languages in world that are also written top to bottom. In that case a vertical tab might be useful same as the horizontal tab is used for English text.

    I tried searching, but couldn't find anything useful yet.

    0 讨论(0)
  • 2020-12-02 06:26

    A vertical tab was the opposite of a line feed i.e. it went upwards by one line. It had nothing to do with tab positions. If you want to prove this, try it on an RS232 terminal.

    0 讨论(0)
  • 2020-12-02 06:29

    similar to R0byn's experience, i was experimenting with a Powerpoint slide presentation and dumped out the main body of text on the slide, finding that all the places where one would typically find carriage return (ASCII 13/0x0d/^M) or line feed/new line (ASCII 10/0x0a/^J) characters, it uses vertical tab (ASCII 11/0x0b/^K) instead, presumably for the exact reason that dan04 described above for Word: to serve as a "newline" while staying within the same paragraph. good question though as i totally thought this character would be as useless as a teletype terminal today.

    0 讨论(0)
  • 2020-12-02 06:42

    Microsoft Word uses VT as a line separator in order to distinguish it from the normal new line function, which is used as a paragraph separator.

    0 讨论(0)
提交回复
热议问题