Difference between revisions of "00D6"
(Redirecting to Conditional statement) |
(page updates) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | {{OpCode | |
+ | | games = {{Icon|t}} | ||
+ | | command = ANDOR | ||
+ | | description = [[Wikipedia:If-then-else|IF]] statement | ||
+ | | syntax1 = 00D6: if [''int''] | ||
+ | | syntax2 = if, if and, if or | ||
+ | | p1t = [''int''] | ||
+ | | p1d = 0 to 7, 21 to 27 | ||
+ | }} | ||
+ | |||
+ | This opcode is used in [[Conditional statement|conditional statements]]. Up to eight conditional opcodes are supported under one IF. [[Sanny Builder]] uses a more efficient syntax of dealing with IF statements but it can still use the old syntax of dealing with them. The [[Mission Builder]] and many older decompilers uses the old syntax, which is minimally modified from decompiled code. | ||
+ | |||
+ | * <code>00D6: if 0</code> | ||
+ | A value of ''0'' is equivalent to Sanny Builder syntax <b><code>if</code></b>. It means there is only one condition. The condition must be true for the statement to be true. This line can be omitted to save space. | ||
+ | |||
+ | * <code>00D6: if 1</code> ... <code>00D6: if 7</code> | ||
+ | A value between ''1'' and ''7'' is equivalent to Sanny Builder syntax <b><code>if and</code></b>. A value of ''1'' means there are two conditions and a value of ''7'' means there are eight conditions. All conditions must be true for the statement to be true. | ||
+ | * <code>00D6: if 21</code> ... <code>00D6: if 27</code> | ||
+ | A value between ''21'' and ''27'' is equivalent to Sanny Builder syntax <b><code>if or</code></b>. A value of ''21'' means there are two conditions and a value of ''27'' means there are eight conditions. At least one condition must be true for the statement to be true. | ||
+ | |||
+ | == Keywords == | ||
+ | if, for, while, conditional, statement |
Latest revision as of 17:26, 15 June 2016
- Description
- IF statement
- Syntax
- 00D6: if [int]
- if, if and, if or
- Parameter
- [int]
- 0 to 7, 21 to 27
This opcode is used in conditional statements. Up to eight conditional opcodes are supported under one IF. Sanny Builder uses a more efficient syntax of dealing with IF statements but it can still use the old syntax of dealing with them. The Mission Builder and many older decompilers uses the old syntax, which is minimally modified from decompiled code.
00D6: if 0
A value of 0 is equivalent to Sanny Builder syntax if
. It means there is only one condition. The condition must be true for the statement to be true. This line can be omitted to save space.
00D6: if 1
...00D6: if 7
A value between 1 and 7 is equivalent to Sanny Builder syntax if and
. A value of 1 means there are two conditions and a value of 7 means there are eight conditions. All conditions must be true for the statement to be true.
00D6: if 21
...00D6: if 27
A value between 21 and 27 is equivalent to Sanny Builder syntax if or
. A value of 21 means there are two conditions and a value of 27 means there are eight conditions. At least one condition must be true for the statement to be true.
Keywords
if, for, while, conditional, statement