What is a vertical tab?

后端 未结 10 1216
醉酒成梦
醉酒成梦 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.

提交回复
热议问题