As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


CamelCase

From sasCommunity
Jump to: navigation, search

CamelCase or Camel Case and also camelCase, (a writing practice known as medial capitals by English scholars), refers to the way capitalised words are squashed together by eliminating the spaces between the words in order to create meaningful identifiers in computer programming languages and document markup languages. This approach was also used in early versions of wiki as a way of identifying words combinations, or concepts to turn into wiki links to other pages on the wiki.

Because words containing capital letters in the middle of them rarely occur in written English, this writing style was used as an easy way to identify word combinations that should be associated with wiki page links. However, later wiki software, such as MediaWiki used for Wikipedia do not use CamelCase to create wiki links, and instead enclose the link words in pairs of square brackets.

CamelCase use in SAS

In SAS identifier capitalisation is ignored. Internally SAS converts all identifiers to upper case, causing SAS to be case insensitive. While SAS allows CamelCase to be used for any identifiers, its use does not convey any syntactic or semantic meaning. Thus SAS treats CamelCase, camelCase, camelcase and CAMELCASE as the same identifier.

There is one smallBenefit of using CamelCaseForVariableNames. If the ODS system ever has to split a name over two or more lines to stack the column heading for a more pleasing vertical layout, she will prefer to split at a caseTransition, and so your multi word variable names have a better chance of splitting at "pleasing" boundaries.

Further reading