define 定义

来源:百度知道 编辑:UC知道 时间:2024/05/30 22:09:07
#define ValMask 0x1000

#define OP_ParenthesisL 0x0000
#define OP_ParenthesisR 0x0001
#define OP_Not 0x0002
#define OP_Mul 0x0003
#define OP_Div 0x0004
#define OP_Add 0x0005
#define OP_Minus 0x0006
#define OP_Equals 0x0007
#define OP_HashKey 0x0008

#define ValLong 0x1010
#define ValFloat 0x1020
这里面的0x0000。。。都是何意思??

0x开头的标示的是16进制数.

你这些宏看起来像MASK,就是标志,那些属性有,那些属性没有

但是,通常都采用2的幂.

比如
0x0001------1
0x0002------2
0x0004------4
0x0008 -----8
0x0010 -----16

这是一种标记而已嘛。主要看define的名字的意思。OP_ParenthesisL 这个的意思是左括号操作符,所以意思就是左括号用0x0000这个值来标记。其他的一样。

应该是用作地址用的

连续的地址