Upper or lower case offset at the end of abbreviations in the Coding Convention

For instance; I have a function called:

int ReadEncoderSpeedRPM_ ( int channel );

I want to split it left and right. But fewer Revolutions per minute at the end, limits me from this kind of renaming;

int ReadEncoderSpeedRPML_ (void);
int ReadEncoderSpeedRPMR_ (void);

It annoys, renames others Posible;

int ReadEncoderSpeedRPM_L_ (void);
int ReadEncoderSpeedRPMl_  (void);
int ReadEncoderSpeedRPMl_  (void);
int ReadEncoderSpeedRpmL_  (void); // My Favourite but I think I'm losing Acronym...
int ReadEncoderSpeedrpmL_  (void);

Which one (or the other) is most recommended, recommended and why?

+4
source share
2 answers

According to this , it int ReadEncoderSpeedRpmL_ (void);seems like the right option.

+3
source

I would prefer a name like

int ReadEncoderSpeedRpmLeft (void);
int ReadEncoderSpeedRpmRight (void);

-, , .

+1

Source: https://habr.com/ru/post/1651399/


All Articles