If/es: Difference between revisions
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
Line 26: | Line 26: | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
[[File: | [[File:key_held_example.gif|alt=If example gif|thumb]] | ||
[[File:if_example.png|alt=If example code|thumb]] | [[File:if_example.png|alt=If example code|thumb]] | ||
</div> | </div> |
Latest revision as of 18:05, 16 August 2023
si [_]
es un bloque de código parte de lógica cajón.
if [_]
is a code block part of the Logic drawer.
Uso
si [_]
toma en declaraciones comparativas de la Lógica cajón para probar una condición. El agente solo seguirá los comandos adjuntos al gancho si la declaración es verdadera.
Sintaxis
Example
This is a game in which the frog attempts to catch flies. The player can move the frog using the arrow keys on the keyboard. The program can process this input using the if block in conjunction with key held? or key typed?.