武装突袭 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