C programming style
Kim Christian Madsen
kimcm at diku.UUCP
Wed Jul 17 07:03:35 AEST 1985
In article <480 at mmintl.UUCP> franka at mmintl.UUCP (Frank Adams) writes:
>
>I am an experienced programmer. I have been writing C for about four
>months now.
Does that make you a experienced C programmer ???? (-;
>I agree that "i++" is an abomination. (I do use it, however, to be
>consistent with the rest of the code I work with.) Actually, C has
>a third way to represent this operation: "i += 1". Personally, I
>think this is the superior notation. It is concise, yet easy enough
>for a person unfamiliar with the language to interpret.
The main advantage of the ++ or -- notation in C is that you can construct
a loop and control the increment-variable [let's call it ``i'' for the old
Fortran days] by means of ++i or i++ in order to assure that ``i'' has the
proper value after the loop -- instead of +/- 1 which is the default in many
other languages as Pascal/Fortran/Basic etc...
--Kimcm at diku.uucp
More information about the Comp.lang.c
mailing list