end
is a special primitive that tells NetLogo that a procedure is finished. Just as a procedure starts with either to
or to-report
, it concludes with an end
. A procedure that does not finish with end
will cause an error.
xxxxxxxxxx
to draw
clear-all
ask patches [ set pcolor white ]
create-turtles 50 [ pen-down ]
repeat 180 [
ask turtles [
pen-down
fd 0.1
rt 2
]
display
]
end
Once you mastered the end
primitive, don't stop there. Check out the resources below to improve your NetLogo skills.
end
primitive:mod
Performs the modulo operation; reports the remainder from the division of the first number by the second number.
create-links-with
Creates links with every agent in an agentset.