Call (returns): Difference between revisions

From StarLogo Nova Wiki
(Created page with "<languages/> <translate> <section begin=image/>alt=The Call (returns) Block|thumb<section end=image/><p id="tooltip">Calls a procedure that returns a value.</p> Category:Procedures Category:Code Block </translate>")
 
(Marked this version for translation)
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:
<translate>
<translate>


<section begin=image/>[[File:Call (returns).png|alt=The Call (returns) Block|thumb]]<section end=image/><p id="tooltip">Calls a procedure that returns a value.</p>
<!--T:1-->
<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== <!--T:3-->
<!--T:4-->
Calls a procedure that returns a value.
==Syntax== <!--T:5-->
<!--T:6-->
Inputs in this block:
#a created procedure that returns a numerical value from the dropdown menu
==Example== <!--T:7-->
<!--T:8-->
[[File:call_(returns)_example.gif|alt=Call (returns) example gif|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]].
==Related Blocks== <!--T:10-->
<!--T:11-->
*[[Special:MyLanguage/Call|Call]]
<!--T:2-->
[[Category:Procedures]]
[[Category:Procedures]]
[[Category:Code Block]]
[[Category:Code Block]]


</translate>
</translate>

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