On 05/04/17 09:56, Ahem A Rivet's Shot wrote:
> On 4 Apr 2017 23:06:49 GMT
> Charlie Gibbs wrote:
>
>> That's the problem I was having. I'm stuck in a nasty middle ground where
>> I want to indent my C code by multiples of 4 spaces, and many programs
>> (e.g. cat) assume a tab every 8 spaces. So I wind up typing 4 spaces
>> for the first level of indentation, tab for the second level, tab plus
>
> *Horrible* (unless your editor is actually converting the tabs to
> spaces which some do) a tab character is an instruction to jump to the next
> tab stop (wherever that may be) so assuming any fixed number of spaces is
> wrong. Indentation is best done using either spaces or tabs but never mixed.
>
> I prefer to use tabs for indentation and only for indentation
> (alignment within an indentation block uses spaces) because I can display
> the code with any tab settings and it aligns perfectly, however when its
> not my own code and others will be editing it then spaces are less likely to
> get screwed up and that's what goes into the coding standards, usually
> enforced by a checkin gate.
>
Of course there is the time when a co worker decides to compact all the
source files by reducing 8 spaces to a tab...including the spaces in the
carefully formatted strings for the help and information screen display
of the embedded product...
--
There is something fascinating about science. One gets such wholesale
returns of conjecture out of such a trifling investment of fact.
Mark Twain
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|