C 变量和函数开头加一个和两个下划线的作用变量,函数加一个和两个下划线的用途:
The underline can be used as part of a variable name, and adds greatly to the readability of the resulting code. It is used by some, but not all, experienced C programmers. A few underlines are used for illustration in this tutorial. Since most compiler writers use the underline as the first character for variable names internal to the system, you should refrain from using the underline to begin an identifier to avoid the possibility of a name clash. To get specific, identifiers with two leading underscores are reserved for the compiler as well as identifiers beginning with a single underscore and using an upper case alphabetic character for the second. If you make it a point of style to never use an identifier with a leading underline, you will not have a naming clash with the system. It adds greatly to the readability of a program to use descriptive names for variables and it would be to your advantage to do so. Pascal and Ada programmers tend to use long descriptive names, but most C programmers tend to use short cryptic names. Most of the example programs in this tutorial use very short names for that reason, but a few longer names are used for illustrative purposes. 上面意思就是说加一个_的变量一般都在complier的writer使用的,加两个_ _的are reserved for compiler 和 一个_加上一个大写字母都是这样的情形 防止名字冲突 ------------------ |
|