If/es: Difference between revisions
(Created page with "==Para tener en cuenta==") |
(Updating to match new version of source page) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> | <languages/> | ||
[[Category: | [[Category:Lógica]] | ||
<section begin=image/>[[File:If.png|alt=el bloque si|thumb]]<section end=image/> | <section begin=image/>[[File:If.png|alt=el bloque si|thumb]]<section end=image/> | ||
<section begin="name" />'''<code>si [_]</code>'''<section end="name" /> es un [[bloque de código]] parte de [[Special:MyLanguage/ | <section begin="name" />'''<code>si [_]</code>'''<section end="name" /> es un [[Special:MyLanguage/Code Block|bloque de código]] parte de [[Special:MyLanguage/Logic|lógica]] cajón. | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
<section begin=name/>'''<code>if [_]</code>'''<section end=name/> is a [[code block]] part of the [[Logic]] drawer. | |||
</div> | |||
<span id="Usage"></span> | |||
==Uso== | |||
<p id="tooltip"><code>si [_]</code> toma en declaraciones comparativas de la [[Special:MyLanguage/Logic|Lógica]] cajón para probar una condición. El [[Special:MyLanguage/Agent|agente]] solo seguirá los comandos adjuntos al gancho si la declaración es verdadera.</p> | |||
<p id="tooltip"><code>si [_]</code> toma en declaraciones comparativas de la [[Special:MyLanguage/Logic|Lógica]] cajón para probar una condición. El[[Special:MyLanguage/Agent|agente]] solo seguirá los comandos adjuntos al gancho si la declaración es verdadera.</p> | |||
<span id="Syntax"></span> | |||
===Sintaxis=== | ===Sintaxis=== | ||
<code> si[Insert: Condition]</code> | |||
<section begin=image/>[[File:Si Es.png|right|alt=The if Block|thumb]]<section end=image/> | |||
<!-- <code>si [Insert: Condition]</code> --> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
==Example== | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
[[File:key_held_example.gif|alt=If example gif|thumb]] | |||
[[File:if_example.png|alt=If example code|thumb]] | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
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 [[Special:MyLanguage/Key Held?|key held?]] or [[Special:MyLanguage/Key Typed?|key typed?]]. | |||
</div> | |||
<span id="Nuances"></span> | <span id="Nuances"></span> | ||
Line 15: | Line 38: | ||
==Bloque relacionados== | ==Bloque relacionados== | ||
*<code>[[If Else|si[_] sino]]</code> | *<code>[[Special:MyLanguage/If Else|si [_] sino]]</code> |
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?.