Hungarian Notation
| Written by: | dimport | | Published by: | Nightscript | | Published on: | 2003-06-21 07:19:46 | | Topic: | c |
|
| |
| Hungarian notation was first devised at Microsoft by a guy called Charles Simonyi initially to enable the many programmers working on the same project to understand what was going on someone else's source code. |
Before Hungarian notation every programmer used a different scheme for naming their variables, making stuff hard to follow, Hungarian notation came along and provided a unilateral way to name identifiers and was adapted by MS, 15 years on its still the most popular naming convention for windows programming (win32 as well as MFC) so its an idea to know it. Although, inevitably a few different versions have cropped over the years you can usually make out what's going on.
b: Bool.
by: Unsigned char or byte.
c: Character.
cx / cy: short used to denote size.
dw: double word/dword.
fn: Function.
h: Handle.
i: Int.
l: Long.
n: Short Int.
p: a pointer variable containing the address of a variable.
s: string.
sz: old style ASCIIZ null-terminated string.
w: WORD unsigned int.
x, y: shorts used to denote coordinates.
This article was originally written by Pigsbig78 |
| This is an article from http://www.osix.net - view the original at: http://www.osix.net/modules/article/?id=245 |
|