Re: Switch Statement gcc 3.2

From: Thomas Matthews (Thomas_MatthewsSpitsOnSpamBots_at_sbcglobal.net)
Date: 03/22/04


Date: Mon, 22 Mar 2004 15:45:56 GMT

Andre Heinen wrote:

> On Mon, 22 Mar 2004 03:25:34 -0500 (EST), "Arthur J. O'Dwyer"
> <ajo@nospam.andrew.cmu.edu> wrote:
>
>
>>Tabs are evil.
>
>
> BTW, why?
>

For the simple fact that there is no standard definitions
for how many spaces are replaced by a tab.

There are two definitions for expanding a tab: to the
next tab setting (position) or replace with a fixed number
of spaces.

Tab positions are defined in length from the left margin
in units of length (i.e. inches, millimeters, points, etc.)
In order to position to a given column, one has to know the
physical width of a "space" in the current font and place
the "cursor" at that point. Some wordprocessors may just
end the text record at the point of the tab and start a
new record after the tab, using a new horizontal position.

Tabs can also be replaced by a fixed number of spaces.
There is no standard for the quantity. Popular quantities
are 4, 8, 3, and two. Some guidelines use 5. Other times
it depends on the context of the document. For example,
a C program may use 4 spaces per tab while an assembly
language listing may use 8. By the way, the distance
may differ based on the font. Fonts with variable-width
character spacing will show up differently than fixed
pitch fonts. Also, font size will also have an effect
on the appearence of a tab.

Most portable programs use spaces instead of tabs and
assume a fixed-pitch font.

-- 
Thomas Matthews
C++ newsgroup welcome message:
          http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq:   http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
          http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
     http://www.josuttis.com  -- C++ STL Library book