What is a vertical tab?

156,354

Solution 1

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.

Solution 2

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.

Solution 3

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.

Solution 4

It was used during the typewriter era to move down a page to the next vertical stop, typically spaced 6 lines apart (much the same way horizontal tabs move along a line by 8 characters).

In modern day settings, the vt is of very little, if any, significance.

Solution 5

The ASCII vertical tab (\x0B)is still used in some databases and file formats as a new line WITHIN a field. For example:

Share:
156,354

Related videos on Youtube

dmazzoni
Author by

dmazzoni

Software engineer at Google

Updated on January 10, 2020

Comments

  • dmazzoni
    dmazzoni over 4 years

    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 someone generate it?

    Is there any language or system still in use today where the vertical tab character does something interesting and useful?

    • Zabba
      Zabba almost 14 years
      Great explanation here: en.wikipedia.org/wiki/Tab_key
    • Ron
      Ron almost 12 years
      I've been using it in .vsv files so I don't have to think about how to quote textual data in my fields.
  • Talvi Watia
    Talvi Watia almost 14 years
    It could also be use to scroll the screen quickly. Useful in the days of 300 Baud.
  • Wiliam
    Wiliam over 10 years
    And some data providers like TechData use it in CSV files to replace \n.
  • Siken
    Siken about 10 years
    So, this is shift-enter?
  • Ryan Hiebert
    Ryan Hiebert about 10 years
    I thought of this, but then dismissed it because in vertical languages a normal tab would be semantically appropriate.
  • Praveen Kumar Purushothaman
    Praveen Kumar Purushothaman over 9 years
    No, but Ctrl + Enter!
  • AnT stands with Russia
    AnT stands with Russia over 9 years
    @BillThor: Great, but what was the exact specification of VT? What did it actually do? I assume, based on your description, that it moved the imaginary "cursor" vertically down to the next "vertical tab" position. But did it also return the cursor to the beginning of the line? Or did it keep the X position of the cursor unchanged?
  • BillThor
    BillThor over 9 years
    @AnderyT I believe the specification was to advance to the next tab stop down. Any horizontal movement would depend on the device. Line-feed was specified to advance to the next line, some devices would perform a carriage return as well, others would just advance the line and continue printing at the next character position. The stty onlret option provided consistent behavior by adding a carriage return to any line feeds.
  • Valentin H
    Valentin H almost 9 years
    "I don't believe anyone would have a reason to use it any more." - one of the most important protocols in health-care HL7 uses <VT> to signal a starting message :-) Probably because this character will never occure in load-data.
  • BillThor
    BillThor almost 9 years
    @ValentinHeinitz Interesting re-purposing of the <VT>. There are control characters that are meant for that purpose such as <SOH> (start of heading), <SOT> (start of text) and the separator characters <FS>, <GS>, <RS>, and <FS>, all of which may be more obscure than <VT>.
  • Alex Essilfie
    Alex Essilfie over 8 years
    @dan04: Can you please update the link to the Microsoft Wordk KB article?
  • Gerrit-K
    Gerrit-K about 7 years
    This does also apply to OneNote (and probably every other MS Office Product with Word-like input). And contrary to @PraveenKumar, it does this when hitting Shift+Enter, not Ctrl+Enter. The latter does nothing, at least in my case.
  • Gerrit-K
    Gerrit-K about 7 years
    @paulroho in Word, yes, in OneNote, no. I'm afraid that my previous statement about "probably every other MS Office Product with Word-like input" is not correct, as OneNote's input is not really an MS Office integration but rather a lookalike ... nevertheless, my second statement should still be valid: Shift+Enter inserts VT, not Ctrl+Enter (which inserts page break in Word and nothing in OneNote).
  • Sled
    Sled over 6 years
    @BillThor Those control characters are great for storing user entered data since you don't need to worry about escaping characters since there are not valid for the input.
  • Sebastian Mach
    Sebastian Mach almost 6 years
    @ArtB: I can enter SOH and some others just fine, e.g. using copy+paste. What next? Forbid copy+paste? I can automatically enter stuff just fine without copy+paste, e.g. using KeePass. Never, never, never, never assume the user is not able to enter something.
  • Sebastian Mach
    Sebastian Mach almost 6 years
    @ArtB: Not wanting to provoke you, but I hope you don't spread such dangerous false wisdom in the company you work for as a tech lead?
  • Sled
    Sled almost 6 years
    @SebastianMach what is dangerous about it? We only allowed (and validated) alphanumeric, punctuation, and space characters. As such, we knew our user input never contained them. Therefore, when storing data, we were free to use the to limit string to structure the data. Thus we avoided all the problems of having to quote or escape string contents. The code was cleaner and simpler. These characters were intended for such use in binary formats. I haven't used them in over 10 years, but it's still on the table for the right situation. As always, choose carefully, consider everything.
  • Sebastian Mach
    Sebastian Mach almost 6 years
    @ArtB: These specs were missing in your previous comment, which read like "if we use those as separators, no further work to ensure input consistency is required". Personally, when it comes to input, I am the whitelist kind of programmer: Everything forbidden, unless explicitly permitted.
  • DevPlayer
    DevPlayer about 5 years
    I had hoped to have used the vertical tab in Python to navigate the console screen in Microsoft Windows console. But library msvcrt.putch(b'\v') does not operate so.
  • Solomon Ucko
    Solomon Ucko about 5 years
    In Google Docs/Sheets/Slides/etc., the same thing holds true. The keyboard shortcut is Shift+Enter.