Three general naming of CSS naming normalization

Source: Internet
Author: User
Tags lowercase uppercase letter
Camel-style nomenclature:


, as its name implies, refers to the combination of uppercase and lowercase letters to form variables and function names. For example, the following is the same function named after the camel-style and underline method:


printemployeepaychecks ();


print_employee_paychecks ();


the first function name uses camel-style nomenclature, each logical breakpoint in the function name is marked with an uppercase letter, and the second function name is underlined, and each logical breakpoint in the function name is marked with an underscore.


camel nomenclature has become more prevalent in recent years, and is used in many new libraries and environments such as Microsoft Windows. On the other hand, the underline method is popular after the advent of C, and in many old programs and UNIX environments, it is used very widely.


Hungarian nomenclature:


is widely used in environments such as Microsoft Windows. Naming conventions for variables (also including macros) used in Windows programming Hungarian nomenclature, which was proposed by Charles Simone, a competent Microsoft programmer.


Hungarian nomenclature identifies the scope, type, and so on of variables by prefixing the variable name with the corresponding lowercase letter symbol identifier. These symbols can be used at the same time, in order of first m_ (member variable), then pointer, then simple data type, and so on.


, for example: M_lpszstr, represents a long pointer member variable that points to a string ending in 0 characters.


Hungarian nomenclature The key is that the name of the identifier is prefixed with one or more lowercase letters, and after the prefix is a word or combination of words with a first letter, indicating the purpose of the variable.


Pascal (Pascal) nomenclature:


is similar to the Camel nomenclature. Just camel nomenclature is the first letter lowercase, and Pascal nomenclature is the first letter capital, such as:


DisplayInfo ();


string UserName;


Both of them adopt the Pascal nomenclature method. In C #, the name of Pascal and the Camel nomenclature are mostly used.

Summary of
Three naming conventions:


MyData is an example of Pascal's name


and MyData is a camel nomenclature, it is the first word of the first letter lowercase, after the word first letter capitalization, looks like a camel


while Imydata is a Hungarian nomenclature, its lowercase i illustrates its form, followed by the same name as Pascal, indicating the purpose of the variable.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.