Le 29/08/2011 20:03, mike a écrit :
I strongly disagree on using anything that resembles K&R.
Where I work you could get reprimanded and maybe even fired if you did
use it.
So are you saying that
if (x == y) {
x++;
} else {
x--;
}
is a serious offence where you work? If it is, I'd love to know the
logic behind the argument.
We have very strict coding rules, that is just part of it.
This part is for clarity. Code written like this is very hard to follow and we
are not allowed to code like that.
You don't get fired for 1st offence, just if you insist on not following coding
rules, after a while the boss and other programmers will get pissed off.
The other part is the naming
exemple with a file named App.c a variable for odometer would look like this
unsigned long ulApp_eOdometer_E2p;
or
U32 ulApp_eOdometer_E2p;
Since it is to be saved in EEPROM it ends with _E2p
Some constant in Flash would end with _Fls
I agree with the first part, my opinion on naming of variables isn't much
different of that of Linus on the subject.
Linus has some amusing comments on this naming of variables
Michel
--
Tired of Microsoft's rebootive multitasking?
then it's time to upgrade to Linux or eComStation.
http://home.comcast.net/~mcatudal
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development