Tab characters

from Wikipedia, the free encyclopedia

A tab character is a control character which , depending on the evaluating software application, indicates in text files that the positioning for a following text character is to be advanced horizontally (to the next tab stop) or vertically according to the settings of the software application, or that a following text character is to be moved to the next Column in a table (then the file is to be viewed as a CSV file with the tab character as the data field separator).

The usual tabulator character is the horizontal tabulator character (HT), which has the code point 9 in ASCII and Unicode and can be designated as + I or . In C and other programming languages , the escape sequence can be used to insert this character into a string constant. The horizontal tab character is usually generated by pressing the tab key on standard keyboards . Strg^I \t

There is also a vertical tab character (VT); this has the code point 11 in ASCII and Unicode (decimal, Strg+ K or ^K, escape sequence \v). With older line printers, this caused a feed to the next number of lines divisible by 6; today the use of this symbol is no longer common.

The horizontal tab character is often used in source code files to clearly display insertions according to the block nesting depth. The distance between the tab stops is usually assumed to be a fixed value, often 4, in older applications also 8. This practice is controversial because the use of tab characters when viewing the files is indistinguishable from spaces (provided that the text editor used does not use the tab characters with a visible character) and the correct display of the source text depends on the current display software using the same tab stop settings as the one used to create it.

See also

Individual evidence

  1. Jamie Zawinski: Tabs versus Spaces: An Eternal Holy War. 2000, accessed March 28, 2018 .
  2. ^ Adam Spiers: Why I prefer no tabs in source code. April 2, 2005, accessed March 28, 2018 .
  3. ^ Charles Samuels: Why I love having tabs in source code. Archived from the original on November 5, 2005 ; Retrieved on March 28, 2018 (replica to Adam Spiers (previous individual reference)).