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


Relevant Pages

  • Re: notepad info to Word lined up?
    ... That's because Lucida Console is a fixed-width font, ... If you use a variable-width font you just don't get ... I don't know what 'tab characters' means. ... & b' ...I switched my word font to meet my notepad font then ...
    (microsoft.public.word.conversions)
  • Re: Envelope font/size
    ... and a document is cut off from its template at the ... > Word, I click on the "letter" icon and Word opens, and everything is set ... > including my address in the middle at the tab - exactly as I want it. ... > to font style was mine, ...
    (microsoft.public.word.docmanagement)
  • Re: Envelope font/size
    ... Instead of bothering with Normal.dot and templets that the I'll never figure ... Word, I click on the "letter" icon and Word opens, and everything is set up - ... including my address in the middle at the tab - exactly as I want it. ... to font style was mine, ...
    (microsoft.public.word.docmanagement)
  • Re: Equations in Word 2007
    ... There basically is no choice but Cambria Math. ... mind the font style per se, so I can live with that. ... type a number, tab to the next place, put in an equation, then tab a couple ... display and professional - I didn't play with them when I ...
    (microsoft.public.word.drawing.graphics)
  • Re: How Tabs In Memos Work
    ... so your best option is to parse each line character ... > memo lines contain tab characters. ... width of the system font. ... while using div 2 does. ...
    (borland.public.delphi.language.objectpascal)