If: Difference between revisions
No edit summary |
(Marked this version for translation) |
||
Line 2: | Line 2: | ||
<translate> | <translate> | ||
<!--T:14--> | |||
[[Category:Logic]] | [[Category:Logic]] | ||
<!--T:15--> | |||
<section begin=image/>[[File:If.png|alt=The if block|thumb]]<section end=image/> | <section begin=image/>[[File:If.png|alt=The if block|thumb]]<section end=image/> | ||
<section begin=name/>'''<code>if [_]</code>'''<section end=name/> is a [[code block]] part of the [[Logic]] drawer. | <section begin=name/>'''<code>if [_]</code>'''<section end=name/> is a [[code block]] part of the [[Logic]] drawer. | ||
==Usage== | ==Usage== <!--T:16--> | ||
<!--T:17--> | |||
<p id="tooltip"><code>if [_]</code> takes in comparative statements from the [[Logic]] drawer to test for a condition. The [[agent]] will only follow commands attached to the hook if the statement is true.</p> | <p id="tooltip"><code>if [_]</code> takes in comparative statements from the [[Logic]] drawer to test for a condition. The [[agent]] will only follow commands attached to the hook if the statement is true.</p> | ||
===Syntax=== | ===Syntax=== <!--T:18--> | ||
<!--T:19--> | |||
<code>if [Insert: Condition]</code> | <code>if [Insert: Condition]</code> | ||
==Nuances== | ==Nuances== <!--T:20--> | ||
<!--T:21--> | |||
==Related Blocks== | ==Related Blocks== | ||
*<code>[[If Else|if [_] else]]</code> | *<code>[[If Else|if [_] else]]</code> | ||
</translate> | </translate> |
Revision as of 13:42, 13 July 2023
if [_]
is a code block part of the Logic drawer.
Usage
if [_]
takes in comparative statements from the Logic drawer to test for a condition. The agent will only follow commands attached to the hook if the statement is true.
Syntax
if [Insert: Condition]