Content deleted Content added
AdeiTamayo (talk | contribs) No edit summary |
|||
Line 178:
===C and C++===
In [[C (programming language)|C]] and [[C++]], [[keyword (computer programming)|keyword]]s and [[standard library]] identifiers are mostly lowercase. In the [[C standard library]], abbreviated names are the most common (e.g. <code>isalnum</code> for a function testing whether a character is alphanumeric), while the [[C++ standard library]] often uses an underscore as a word separator (e.g. <code>out_of_range</code>). Identifiers representing [[C preprocessor#Macro definition and expansion|macros]] are, by convention, written using only uppercase letters and underscores, for example <code>NULL</code> and <code>EINVAL</code> (this is related to the convention in many programming languages of using all-upper-case identifiers for constants). Names containing double underscore or beginning with an underscore and a capital letter are reserved for implementation ([[compiler]], [[standard library]]) and should not be used (e.g. <code>__reserved</code> or <code>_Reserved</code>).<ref>{{Cite web | title = ISO/IEC 9899:1999 Programming languages – C | publisher = ISO | url = http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=29237}}</ref><ref>{{Cite web | title = ISO/IEC 14882:2011 Information technology – Programming languages – C++ | publisher = ISO | url = http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=50372}}</ref> This is superficially similar to [[Stropping (syntax)|stropping]], but the semantics differ: the underscores are part of the value of the identifier, rather than being quoting characters (as is stropping): the value of <code>__foo</code> is <code>__foo</code> (which is reserved), not <code>foo</code> (but in a different namespace).
===C#===
|