Re: Tabs vs. Spaces

From: r norman (rsn__at__comcast.net)
Date: 05/24/04


Date: Mon, 24 May 2004 15:50:32 -0400

On Mon, 24 May 2004 21:06:28 +0200, The Mike <kiddiniowski@yahoo.com>
wrote:

>
>Sorry for bothering you with such an old subject. However, I've
>recently read a corresponding disussion and I'm wondering once again:
>What's the fuzz about it? AFAICS it's quite simple: if I use spaces,
>everyone who reads my code has to suffer from my indentation style. If
>I use tabs everyone will be able to view the same code with any
>indentation depth she likes.
>
>It's often said that changing the tabsize could have unwanted
>sideeffects. How could that be? If I enter a <Tab>, a literal Tab
>will be inserted. It's up to the program (lpr, editor ...) to
>interpret the TAB. How could I possibly influence these programs?
>
>Don't get it. Thanks for your input.

If you want columns to align properly and you create your text with a
font that has fixed character width and you fill empty areas with
space characters, then anyone who displays the text with fixed
character width will see the proper formatting. Back in the olden
days, all displays were fixed character width.

On the other hand, if you use tabs then the only way to get columns
to align properly is if my display has the same tab spacing as yours.
Some people who liked to use many levels of indenting set their tabs
every 4 characters -- some oddballs even used three or five.
Unfortunately many output devices, especially mechanical ones like
teletypes and the new-fangled DECwriters usually had tab spacing fixed
at 8. So for text alignment, spaces were really the proper way to
create things.

On the other hand, back in those same olden days, system memory and
floppy disk storage was measured tens of kilobytes -- don't even get
me started with punched paper tape! Storing hundred or even thousands
of space characters in text files wasted precious resources -- tab
spacing set at 8 characters saved a lot of space. So it was a
constant battle. That is why tabify and detabify programs were common.

Next subjects: \n vs. \r\n vs \n\r and the use of Ctrl-Z as EOF mark!



Relevant Pages

  • Re: I have attached a module that accomplishes what I want and does it veryquickly.
    ... I need to know whether the string in the first 'column' is going to extend past the next tab. ... settings and background colors, so the end result looks like a table, ... width of the current tab space it needs to fit into, ... If you know how many characters fit in a specified area that you are ...
    (microsoft.public.word.vba.general)
  • Re: Great SWT Program
    ... Vim -- car is fixed, ... and/or press tab again to get a list of choices. ... to type one or more additional characters and press tab again. ...
    (comp.lang.java.programmer)
  • Re: Decatenate a field with Make Table Query?
    ... You can probably do something similar in MS Word, lining them up using tab characters in ordinary paragraphs. ... You can use Word to delete lines that contain only white space, and you can delete repeated paragraph marks. ... I would define a special paragraph style that would include the tab settings for this operation, but would not save it in the global Word template, as you'll likely never need this style again, so leave "Add to Template" unchecked, but check "Automatically Update". ... In the Excel cell the paragraph marks show up as bangs; ...
    (microsoft.public.access.queries)
  • Re: I have attached a module that accomplishes what I want and does it veryquickly.
    ... I need to know whether the string in the first 'column' is going to extend past the next tab. ... width of the current tab space it needs to fit into, ... If you know how many characters fit in a specified area that you are ...
    (microsoft.public.word.vba.general)
  • Re: VBA - creating TextBox with MaxLength value?
    ... I would insert a textbox control using the control toolbox. ... 'Fixed Character length ... For the second I need to count the number of characters in each text ...
    (microsoft.public.powerpoint)