|
1] 不支持诸如 i++等玩意儿.
2] 不能隐式转换不同类型的数据.
3] 支持指针, 但是函数指针找不到容器来装, 哈哈~~
[codes=galaxy]
void TestFunc() {}
void main() {
// 下面是简单的int指针的示例.
int i = 1;
int *pi = &i;
UIDisplayMessage(PlayerGroupAll(), 4, StringToText(IntToString(i)));
UIDisplayMessage(PlayerGroupAll(), 4, StringToText(IntToString(*pi)));
i = 2;
UIDisplayMessage(PlayerGroupAll(), 4, StringToText(IntToString(i)));
UIDisplayMessage(PlayerGroupAll(), 4, StringToText(IntToString(*pi)));
*pi = 3;
UIDisplayMessage(PlayerGroupAll(), 4, StringToText(IntToString(i)));
UIDisplayMessage(PlayerGroupAll(), 4, StringToText(IntToString(*pi)));
// 下面是函数指针存在的证据.
if (&TestFunc == null) {
UIDisplayMessage(PlayerGroupAll(), 4, StringToText("null"));
}
else {
UIDisplayMessage(PlayerGroupAll(), 4, StringToText("hit"));
}
}
[/codes] |
|