C preprocessing

Rhodri James rmj at tcom.stc.co.uk
Mon Sep 24 23:39:37 AEST 1990


In article <18102 at haddock.ima.isc.com> karl at kelp.ima.isc.com (Karl Heuer) writes:
>In article <59770 at iuvax.cs.indiana.edu> bomgard at iuvax.cs.indiana.edu (Tim Bomgardner) writes:
>>Wouldn't it be nice, if ... the compiler would do what I meant [by
>>interpreting the indentation] instead of what I said?
>
>I personally like the idea, but it's not C (nor any other language I use,
>though I understand Occam has it).  So, being realistic, let's say instead:

I understand (from a friend who uses Occam) that it's a complete pain.
Counting spaces, even on a fixed character width screen like nearly all
are, is at times a non-trivial operation.

>Wouldn't it be nice if the compiler (or some related tool) would provide
>(optional!) warnings for possibly misindented code?

Mmmm. OK, I'll buy that.

>Things to worry about: (a) whitespace caused by macro expansion; (b) how to
>count tabs vs. spaces; (c) accepting all plausible personal indentation styles
>(or making it user-configurable).

My main reason for not wanting to use such a thing is that my
indentation habits varying between 3, 4, 5 and 8 spaces depending on how
I felt when I woke up and whose code I'm working on at the time. I can't
say as I would enjoy having to keep adding switches to my compiles just
to get it to shut up from time to time.

>Karl W. Z. Heuer (karl at kelp.ima.isc.com or ima!kelp!karl), The Walking Lint

Rhodri
-- 
* Windsinger                 * "But soft, what light through yonder
* rmj at islay.tcom.stc.co.uk   *      airlock breaks?"
* rmj at tcom.stc.co.uk         *    --RETURN TO THE FORBIDDEN PLANET
* rmj10 at phx.cam.ac.uk        *  You've gotta be cruel to be Khund!



More information about the Comp.lang.c mailing list