Download NetLogo 4.0 User Manual - scstevenson

Transcript
NetLogo 4.0 User Manual
self
self
Reports this turtle or patch.
"self" and "myself" are very different. "self" is simple; it means "me". "myself" means "the turtle or
patch who asked me to do what I'm doing right now."
See also myself.
; (semicolon)
; comments
After a semicolon, the rest of the line is ignored. This is useful for adding "comments" to your code
−− text that explains the code to human readers. Extra semicolons can be added for visual effect.
NetLogo's Edit menu has items that let you comment or uncomment whole sections of code.
sentence
se
sentence value1 value2
(sentence value1 ...)
Makes a list out of the values. If any value is a list, its items are included in the result directly, rather
than being included as a sublist. Examples make this clearer:
show sentence 1 2
=> [1 2]
show sentence [1 2] 3
=> [1 2 3]
show sentence 1 [2 3]
=> [1 2 3]
show sentence [1 2] [3 4]
=> [1 2 3 4]
show sentence [[1 2]] [[3 4]]
=> [[1 2] [3 4]]
show (sentence [1 2] 3 [4 5] (3 + 3) 7)
=> [1 2 3 4 5 6 7]
set
set variable value
Sets variable to the given value.
Variable can be any of the following:
320
NetLogo Dictionary