Call (returns): Difference between revisions

From StarLogo Nova Wiki
(updates from Blockument)
(Marked this version for translation)
 
Line 5: Line 5:
<section begin=image/>[[File:Call_(returns).png|alt=The Call (returns) Block|thumb]]<section end=image/><p id="tooltip">The value that is returned when this specified procedure is called.</p>
<section begin=image/>[[File:Call_(returns).png|alt=The Call (returns) Block|thumb]]<section end=image/><p id="tooltip">The value that is returned when this specified procedure is called.</p>


==Usage==
==Usage== <!--T:3-->


<!--T:4-->
Calls a procedure that returns a value.
Calls a procedure that returns a value.


==Syntax==
==Syntax== <!--T:5-->


<!--T:6-->
Inputs in this block:
Inputs in this block:
#a created procedure that returns a numerical value from the dropdown menu
#a created procedure that returns a numerical value from the dropdown menu


==Example==
==Example== <!--T:7-->


<!--T:8-->
[[File:call_(returns)_example.gif|alt=Call (returns) example gif|thumb]]
[[File:call_(returns)_example.gif|alt=Call (returns) example gif|thumb]]
[[File:call_(returns)_example.png|alt=Call (returns) example code|thumb]]
[[File:call_(returns)_example.png|alt=Call (returns) example code|thumb]]


<!--T:9-->
In this model, a created [[Special:MyLanguage/Procedure|procedure]] calculates the distance of the “Turtle” agent from the center of spaceland using the pythagorean theorem. Whenever the calculate distance button is pushed, the [[Special:MyLanguage/Procedure|procedure]] ‘Calculate Distance’ is called and the distance from the center is displayed in a data box.  Note that this shape of the call block is used to retrieve the returned information from the [[Special:MyLanguage/Procedure|procedure]].
In this model, a created [[Special:MyLanguage/Procedure|procedure]] calculates the distance of the “Turtle” agent from the center of spaceland using the pythagorean theorem. Whenever the calculate distance button is pushed, the [[Special:MyLanguage/Procedure|procedure]] ‘Calculate Distance’ is called and the distance from the center is displayed in a data box.  Note that this shape of the call block is used to retrieve the returned information from the [[Special:MyLanguage/Procedure|procedure]].


==Related Blocks==
==Related Blocks== <!--T:10-->


<!--T:11-->
*[[Special:MyLanguage/Call|Call]]
*[[Special:MyLanguage/Call|Call]]



Latest revision as of 18:52, 14 August 2023

Other languages:
The Call (returns) Block

The value that is returned when this specified procedure is called.

Usage

Calls a procedure that returns a value.

Syntax

Inputs in this block:

  1. a created procedure that returns a numerical value from the dropdown menu

Example

Call (returns) example gif
Call (returns) example code

In this model, a created procedure calculates the distance of the “Turtle” agent from the center of spaceland using the pythagorean theorem. Whenever the calculate distance button is pushed, the procedure ‘Calculate Distance’ is called and the distance from the center is displayed in a data box. Note that this shape of the call block is used to retrieve the returned information from the procedure.

Related Blocks