Variable naming conventions

Source: Internet
Author: User

Since Windows programs are generally very long, programmers may forget the meaning of the defined variables after a while. To help you remember and differentiate variables, Microsoft has created a naming convention for Windows, called Hungarian notation ). Hungarian notation provides a set of prefix characters, as shown in Table 1.1. These prefixes can also be combined.

Table 1.1 Hungarian notation

Prefix

Meaning

A

Array

B

Boolean (INT)

By

Unsigned characters (bytes)

C

Character (byte)

CB

Byte Count

RGB

Long Integer that saves RGB color values

CX, Cy

Short INTEGER (calculate the length of X and Y)

DW

Unsigned long integer

FN

Function

H

Handle

I

Integer)

M _

Class data member

N

Short or integer

NP

Near pointer

P

Pointer

Continue table

Prefix

Meaning

L

Long Integer

Lp

Long pointer

S

String

SZ

String ending with zero

TM

Body Size

W

Unsigned integer

X, Y

Unsigned integer (representing the coordinates of X or Y)

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.