If then... else if then...: Difference between revisions

From PenguinMod Wiki
Jump to navigation Jump to search
Content added Content deleted
No edit summary
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Blocks
{{Blocks
|block_img =if then else if then.png
|block_img =<gallery>
if then else if then.png|Block
If else 1.png|Workaround
</gallery>
|block_type = C-Block
|block_type = C-Block
|category = [[Control Expansion]]
|category = [[Control Expansion]]
}}
}}
The '''if <> else if <> then''' block is a c-block (also known as an e-block in this case) that runs the code in the if statement if the first boolean is true, and if not, it checks if the second boolean is true and if so runs the code in the else if. To get this block, one must add the "Control Expansion" extension.
The '''if <> else if <> then''' block is a c-block (also known as an e-block in this case) that runs the code in the if statement if the first boolean is true, and if not, it checks if the second boolean is true and if so runs the code in the else if. To get this block, one must add the "Control Expansion" extension.
==Workaround==
This block can be worked around by using an if <> then else block, and putting a "if block" inside of the else portion.
[[Category:C-Shape Blocks]]
[[Category:C-Shape Blocks]]
[[Category:Control Blocks/Expansion]]
[[Category:Control Blocks/Expansion]]

Latest revision as of 20:44, 21 December 2023

If then... else if then...
...
[[File:|200px]]
Caption
Block Type C-Block
Category / Extension Control
Status Who tf uses status

The if <> else if <> then block is a c-block (also known as an e-block in this case) that runs the code in the if statement if the first boolean is true, and if not, it checks if the second boolean is true and if so runs the code in the else if. To get this block, one must add the "Control Expansion" extension.

Workaround

This block can be worked around by using an if <> then else block, and putting a "if block" inside of the else portion.