Llamar (devolver)

From StarLogo Nova Wiki
Revision as of 19:26, 14 August 2023 by FuzzyBot (talk | contribs) (Updating to match new version of source page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Other languages:
The Call (returns) Block

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

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