Definition

Hungarian notation

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.

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.

This was last updated in December 2007
Posted by: Margaret Rouse

Email Alerts

Register now to receive SearchWindowsServer.com-related news, tips and more, delivered to your inbox.
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

More News and Tutorials

Do you have something to add to this definition? Let us know.

Send your comments to techterms@whatis.com

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
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
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: