武装突袭 Wiki
注册
Advertisement
  

点击图片可看到更多讯息

开始使用于

游戏:
Operation Flashpoint: Resistance
版本:
1.85

描述

描述:
First or second element of array is executed depending on result of if condition. Result of the expression executed is returned as a result (result may be Nothing).

基本句法

句法:
if then else
参数:
if: If Type
else: Code or Array with 2 Code elements. See else.
返回值:
Anything

范例

范例1:
if (a > b) then { c = 1 };
范例2:
if (a > b) then { c = 1; } else { c = 2; }; hint str c;

额外资讯

多人游戏:
-
也可以看看:
Control Structuresifelse

注意事项

此处撰写句法皆为可行用法. 可到官网[1]专页回报错误. 你可以使用讨论页面或是论坛来进行讨论.
新增注意事项 | 如何新增?

Notes

Ceeeb
Any variables you declare within the body of an if/then statement (ie between the curly braces) are local to that 'if' statement, and are destroyed at the end of the statement. If you know you want to use the variable outside the 'if' statement, make sure your declare it before the 'if' statement.

Bottom Section

Advertisement