ParameterBegin NetLogo code:
define-parameter no interface add slider add input box (remember to change the box coordinates to be tall enough to see properly) name: initial value: upper left corner: lower right corner: minimum value: maximum value: increment: units: Units displayed on the slider horizontal: Displayed horizontally rather than vertically (true or false) Type check: Can be Number, String, Color, String (reporter), or String (commands). The last two check if the code is runnable. Multi-line: 1 for multi-line, 0 for single line.End NetLogo code
All the text areas can be changed. By clicking on the radio buttons you can choose whether the parameter should have an interface for user control and whether it should be a slider or an input box.
The BehaviourComposer can provide more support if the parameter name begins with "the-". If multiple interface elements have the same location they are placed one under another.
Boolean parameter can be used to create a switch for parameters that can only have true or false as values.
This creates a NetLogo global variable. The global variable can optionally be controlled by a NetLogo slider or input box. Note that define-parameter is not a NetLogo command. NetLogo does not provide support for creating interface elements on the fly. Instead this adds the appropriate element to the NLOGO file. Interface elements are added at load time and cannot be added or removed later. Nor can they be repeated or scheduled.
Parameter was implemented by Ken Kahn on 28 September 2009.