Parameter

From StarLogo Nova Wiki
Other languages:
The Parameter Block

Usage

Returns the value of a selected parameter that has been added in the procedure definition.

Syntax

Inputs in this block:

  1. a created parameter from the dropdown menu

Example

Parameter example gif
Parameter example code

In this model, a procedure called “draw square” was created to draw squares in spaceland, with a parameter that defined the side length of the square. Parameters are useful here because the side lengths are not constant. A parameter is a condition which has to be specified in order for a procedure to execute the desired function.