Procedure/es: Difference between revisions

From StarLogo Nova Wiki
(Updating to match new version of source page)
(Updating to match new version of source page)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<languages/>
<languages/>
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="image"/>[[File:procedure.png|alt=The Procedure Block|thumb]]<section end="image"/>
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
==Usage==
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
<p id="tooltip">Defines a grouping of commands to do a particular function. Select “name” and type over it to rename the procedure.</p>
<p id="tooltip">Defines a grouping of commands to do a particular function. Select “name” and type over it to rename the procedure.</p>
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
==Syntax==
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
Inputs in this block:
#in the “name” box, enter a name for the procedure
#choose the desired return statement from the drop down menu
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
==Example==
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
[[File:call_example.gif|alt=Procedure example gif|thumb]]
[[File:procedure_example.png|alt=Procedure example code|thumb]]
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
In this version of the snake game, the direction the snake moves is determined by which key is typed. This set of instructions is executed while forever is toggled using the procedure ‘read keyboard input.’
</div>
</div>


[[Category:Procedimientos]]
[[Category:Procedimientos]]
[[Category:Code Block]]
[[Category:Code Block]]

Latest revision as of 18:37, 16 August 2023

Other languages:
The Procedure Block

Usage

Defines a grouping of commands to do a particular function. Select “name” and type over it to rename the procedure.

Syntax

Inputs in this block:

  1. in the “name” box, enter a name for the procedure
  2. choose the desired return statement from the drop down menu

Example

Procedure example gif
Procedure example code

In this version of the snake game, the direction the snake moves is determined by which key is typed. This set of instructions is executed while forever is toggled using the procedure ‘read keyboard input.’