C (220/414)

From:Andrew Markwell
Date:11 Jun 2000 at 19:24:21
Subject:Re: Tabs to spaces and visa versa

>From: Tim Hanson <msinister@connectfree.co.uk>
>Reply-To: amiga-c@egroups.com
>To: amiga-c@egroups.com
>Subject: [amiga-c] Re: Tabs to spaces and visa versa
>Date: Sun, 11 Jun 2000 13:36:47 +0100
>
>Hi Andrew
>Andrew Markwell wrote this on 10-Jun-00 at 02:33:47
>
> > Ahh... this requires some thought. You can make two assumptions though;
> >
> > (a) true tabs will always either follow another true tab, OR
> > (b) will follow a newline character.
> >
> > You can just check these two conditions each time your converter comes
> > across 4 spaces.
> >
> > Andrew Markwell
>
>Are you sure this is true? I use tabs to separate all sorts of things.
>TagItems in variarg functions; single line comments; multiple statements on
>one line.
>Also the point of a tab is that it is not fixed length. It takes the cursor
>up
>to the next tab mark so that columns line up even if the preceding phrases
>are different lengths.

I was assuming that the converter was supposed to convert tabs in C/C++
source - i.e. the tabs that most people use to indent code. Of course, if
you use tabs in other places (like the middle of a line) then the converter
would mess up.

In a previous post the author (sorry, forgot his name) mentioned that the
tab size was configurable by the user, so assuming tabs were only used for
indenting then it would line up fine.

Andrew Markwell
"Those who stand in doorways block the passage of life"

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

------------------------------------------------------------------------
IT Professionals: Match your unique skills with the best IT projects at
http://click.egroups.com/1/3381/1/_/451227/_/960747872/
------------------------------------------------------------------------