Re: Is there a convention mandating macros to be all-uppper-case?

Tech-Archive recommends: Speed Up your PC by fixing your registry



Ulrich Eckhardt wrote:
I'd say it is not fine, as people don't expect it to be a macro.

I may add that the (very good!) book "C++ Coding Standards" by Sutter and
Alexandrescu suggest that a) all macros are uppercase and b) only macros
are uppercase for that very reason. However, there is existing practice to
make constants from both constant objects and enumerations all uppercase
and assert() isn't uppercase either, although it should.

Uli


.



Relevant Pages

  • Re: Code Review please.
    ... You really don't need MFC for this program. ... In addition to MFC serving to increase complexity & obfuscation and ensuring non-portability, the use of Microsoft "T" macros does the same. ... Identifiers starting with underscore followed by uppercase letter are reserved for the implementation. ... That's very uncommon, resulting in code that looks awful and inconsistent with Windows convention tab size 4, or *nix convention tab size 8. ...
    (microsoft.public.vc.mfc)
  • Re: Is there a convention mandating macros to be all-uppper-case?
    ... only macros are uppercase for that very reason. ... How would you change the following enum? ... headers, but in other headers i see some like above, and some ...
    (microsoft.public.vc.language)
  • Re: Is there a convention mandating macros to be all-uppper-case?
    ... Alexandrescu suggest that a) all macros are uppercase and b) only macros ... How would you change the following enum? ... If you were to follow standard headers, you would call all identifiers _Foo ...
    (microsoft.public.vc.language)
  • Re: Malcolms new book - Chapter 1 review
    ... convention that macros shall be uppercase. ... write all my macros in uppercase, function-like or otherwise. ...
    (comp.lang.c)
  • Re: Multiple IF Scenario
    ... Frank Kabel ... > Lowercase does not work, but uppercase does. ... > Is it possible without using Macros? ...
    (microsoft.public.excel.misc)