Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Hungarian notation
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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!
==Examples== *<code>bBusy</code> : [[Boolean data type|Boolean]] *<code>chInitial</code> : [[character (computing)|char]] *<code>cApples</code> : count of items *<code>dwLightYears</code> : double [[Word (data type)|word]] (Systems) *<code>fBusy</code> : [[Boolean data type|flag]] (or [[Floating-point|float]]) *<code>nSize</code> : [[Integer (computer science)|integer]] (Systems) or count (Apps) *<code>iSize</code> : [[Integer (computer science)|integer]] (Systems) or index (Apps) *<code>fpPrice</code> : [[floating-point]] *<code>decPrice</code> : decimal *<code>db[[Pi]]</code> : [[double precision|double]] (Systems) *<code>p[[Foo]]</code> : [[pointer (computer programming)|pointer]] *<code>rgStudents</code> : array, or range *<code>szLastName</code> : zero-terminated string *<code>u16Identifier</code> : unsigned 16-bit [[Integer (computer science)|integer]] (Systems) *<code>u32Identifier</code> : unsigned 32-bit [[Integer (computer science)|integer]] (Systems) *<code>stTime</code> : clock time structure *<code>fnFunction</code> : function name The mnemonics for pointers and [[Array data structure|arrays]], which are not actual data types, are usually followed by the type of the data element itself: *<code>pszOwner</code> : pointer to zero-terminated string *<code>rgfpBalances</code> : array of [[floating-point]] values *<code>aulColors</code> : array of unsigned long (Systems) While Hungarian notation can be applied to any programming language and environment, it was widely adopted by [[Microsoft]] for use with the C language, in particular for [[Microsoft Windows]], and its use remains largely confined to that area. In particular, use of Hungarian notation was widely [[Technology evangelist|evangelized]] by [[Charles Petzold]]'s ''"Programming Windows"'', the original (and for many readers, the definitive) book on [[Windows API]] programming. Thus, many commonly seen constructs of Hungarian notation are specific to Windows: * For programmers who learned Windows programming in C, probably the most memorable examples are the <code>wParam</code> (word-size parameter) and <code>lParam</code> (long-integer parameter) for the [[WindowProc]]() function. * <code>hwndFoo</code> : handle to a window * <code>lpszBar</code> : long pointer to a zero-terminated string The notation is sometimes extended in [[C++]] to include the [[scope (programming)|scope]] of a variable, optionally separated by an underscore.<ref>{{cite web|title=Mozilla Coding Style|url=https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Prefixes|website=Developer.mozilla.org|access-date=17 March 2015|archive-date=2 December 2019|archive-url=https://web.archive.org/web/20191202222313/https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Prefixes|url-status=dead}}</ref><ref>{{cite web|title=Webkit Coding Style Guidelines|url=http://www.webkit.org/coding/coding-style.html#names-data-members|website=Webkit.org|access-date=17 March 2015}}</ref> This extension is often also used without the Hungarian type-specification: * <code>g_nWheels</code> : member of a global namespace, integer * <code>m_nWheels</code> : member of a structure/class, integer * <code>m_wheels</code>, <code>_wheels</code> : member of a structure/class * <code>s_wheels</code> : static member of a class * <code>c_wheels</code> : static member of a function
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Hungarian notation
(section)
Add topic