4

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?

Ulli Schmid
  • 1,167
  • 1
  • 8
  • 16
Orhan G. Hafif
  • 379
  • 5
  • 21

2 Answers2

3

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

Community
  • 1
  • 1
Shubham Vasaikar
  • 698
  • 9
  • 23
  • 1
    Do you think this question is duplicate or it is a little bit different? I think may be duplicate but I couldn't find that link before. Oh God, This site has an every answer... – Orhan G. Hafif Aug 16 '16 at 12:16
1

I would prefer a naming like that

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

In my opinion it is more readable if you don't use an abbreviation for Left and Right.

Fischermaen
  • 12,238
  • 2
  • 39
  • 56