Search code examples
coding-stylenaming-conventionscamelcasingacronym

Uppercase or lowercase confusion at the end of the acronyms in Coding Convention


For example; I have a function named that;

int ReadEncoderSpeedRPM_ ( int channel );

I want to divide it into left and right. But short of Revolutions Per Minute at the end, restricts me from that kind of renaming;

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

It irritates, other Posible renames;

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 another one) is most recommended, suggested, and Why?


Solution

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