In programming, Hungarian notation is a set of conventions for naming data objects in which a programmer adds a meaningful prefix of one or several characters to the object's name to identify what type of object it is. The conventions suggest, among other things, that programmers choose prefixes that are suggestive of the type of object named and are easy to remember. Consistency in naming is very important.

Download this free guide

Expert guide: Your first steps in obtaining an IT Certification

Are you looking to advance your career? Expand your knowledge? Boost your credibility? Our editors put together this complimentary 19-page guide on everything you need to know about obtaining an IT certification—with special attention given to cloud and desktop certifications.

By submitting my Email address I confirm that I have read and accepted the Terms of Use and Declaration of Consent.

By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.

You also agree that your personal information may be transferred and processed in the United States, and that you have read and agree to the Terms of Use and the Privacy Policy.

In one programmer's version of Hungarian notation, a form might have the prefix "frm" and, if the form name is "Switchboard," the extended name would be "frmSwitchboard." This makes it clear that the reference is to a form called "Switchboard," and not to some other type of object with the same name, such as a label (which might be called "lblSwitchboard"). The conventions were developed to define naming procedures that would help programmers create prefixes that would be easy to remember and would make objects easy to identify, both for themselves and for other programmers that might work with their code in the future.

Dr. Charles Simonyi developed the convention at Microsoft, where it is used in the Windows source code. Microsoft says it's known as Hungarian notation because the prefixes make the names seem to be non-English and also because Simonyi is from Hungary. Since Microsoft uses it extensively, many programmers outside Microsoft use it. Charles Petzold's use of Hungarian notation in his book, "Programming Windows," also has influenced many Windows programmers.

0 comments

Register

Login

Forgot your password?

Your password has been sent to:

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy