kicad-developers team mailing list archive
Mailing list archive
Re: Bugfix for plotting
Dick Hollenbeck <dick@...>
Tue, 30 Jun 2009 11:17:57 -0500
Thunderbird 220.127.116.11 (X11/20090608)
2009/6/30 Lorenzo <lomarcan@... <mailto:lomarcan@...>>
This fixes the reported issues.
A note about the coding style: the * attached to the type name is
deceptive: C is not Pascal, the pointer modifiers apply only to
the first element!
But, you should always avoid the following:
int *ptr, val;
as it always leads to misunderstandings. Most coding standard mention
The way how pointers are marked in C is somewhat confusing, in other
hand the same operator marks pointer declaration and pointer
dereference - that seemed logical to language authors.
I saw advice to declare only one variable at a time in many places, so
programmer should avoid constructs like:
But lot of people argues that such style creates lot of source code
lines and takes too much time to type.
I put each one on a separate line, and inside the block/scope where they
are used. So it is rare that there is even a requirement for 3 ints
like that, because often one or more can be moved into a for loop scope
or iterator position of the for loop.
Readability is everything to me. I don't give a rats ass about the
number of lines of code. If I was printing it to paper, I might care.
Code is written both for the human and for the compiler. The human is
the one with a handy cap, so I think he needs special consideration.
I am curious what Dick is thinking about it.