Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Hungarian notation
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Computer programming identifier naming notation}} '''Hungarian notation''' is an [[identifier naming convention]] in [[computer programming]] in which the name of a [[variable (computer science)|variable]] or [[subroutine|function]] indicates its intention or kind, or in some dialects, its [[data type|type]]. The original Hungarian notation uses only intention or kind in its naming convention and is sometimes called ''Apps Hungarian'' as it became popular in the [[Microsoft]] Apps division in the development of [[Microsoft Office]] applications. When the [[Microsoft Windows]] division adopted the naming convention, they based it on the actual data type, and this convention became widely spread through the [[Windows API]]; this is sometimes called ''Systems Hungarian'' notation. {{Quote box |quote = '''Simonyi''': ...BCPL [had] a single type which was a 16-bit word... not that it matters. '''Booch''': Unless you continue the Hungarian notation. '''Simonyi''': Absolutely... we went over to the typed languages too later ... But ... we would look at one name and I would tell you exactly a lot about that...<ref>{{cite web|url=http://archive.computerhistory.org/resources/access/text/2015/06/102702232-05-01-acc.pdf |archive-url=https://web.archive.org/web/20150910103308/http://archive.computerhistory.org/resources/access/text/2015/06/102702232-05-01-acc.pdf |archive-date=2015-09-10 |url-status=live|title=Oral History of Charles Simonyi |website=Archive.computerhistory.org\accessdate=5 August 2018}}</ref> |width = 30% |align = right }} Hungarian notation was designed to be language-independent, and found its first major use with the [[BCPL]] programming language. Because BCPL has no data types other than the machine [[Word (computer architecture)|word]], nothing in the language itself helps a [[programmer]] remember variables' types. Hungarian notation aims to remedy this by providing the programmer with explicit knowledge of each variable's data type. In Hungarian notation, a variable name starts with a group of lower-case letters which are [[mnemonic]]s for the type or purpose of that variable, followed by whatever name the programmer has chosen; this last part is sometimes distinguished as the ''given name''. The first character of the given name can be capitalized to separate it from the type indicators (see also [[CamelCase]]). Otherwise the case of this character denotes scope.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)