Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's an error in Rule 52. They specifically say variables shouldnt have any capital letters but their example does.


if you're talking about this example:

  const   uint16    max_pressure = 100; 
  enum  Switch_position  {up, down};
``Switch_position'' is not the name of a variable, but an enum type.


Just to add to what was already said, the doc said for enumerator values - which are indeed lower case in the example. Not a blanket statement for all variables.


No it isn't, it's an enum type.


Perhaps I found an error.

AV Rule 69 says to use `const` by default on member functions. Yet in some examples (e.g. AV Rule 122 in Appendix A) they don't use the `const` keyword when they can.


Nevermind. :-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: