CamelCase (or CamelCaps) is a Capitalisation standard used for variable, type and function names in many computer programming languages. It is neither lower case or UPPER CASE. Some call this CrazyCaps.
Take a phrase, capitalise the first letter of each word, and remove the spaces between words. No underscores are used.
It is so called because the profile resembles the humpy outline of a camel. If you have ever seen a variable called something like
FooLoopCounter or a function called something like
InitSomeGlobalFish, that's CamelCaps.
The Java programming language has an officially approved style for member function names that uses a variation on CamelCaps - every word except the first is capitalised. For instance a method could be called
getSomeValue(). In C# style, this convention is used only for variable names.
You might think that CamelCaps is very straightforward, but there is room for error when compound words, abbreviations and acronyms enter the picture. English grammar is not always clear about these. I'll give some examples:
WheelBarrow are incorrect, as both of these are normally written as one word, even if they are derived from two words each. There will borderline cases, as two words used together will over time form a new compound word. For instance Timetable was originally a table of times, then a Time table.
Abbreviations: Only the first letter is capitalised, for e.g.
Id is short for
Identifier and thus the second letter is not capitalised.
Acronyms are formed from the first letter of each word, and thus all of these letters can be capitalised. For instance, if your program has code to deal with
Point Of Sale terminals, you will most likely shorten this to
Pos, but the correct capitalisation is
POS, as it is derived from three words, e.g. as in
However some standards differ from this: e.g. the Microsoft C# style guide specifies that with acronyms of 3 or more characters, only the first is capitalised.