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.
Try it Yourself
Error
NetLogo Web has encountered a problem.
It looks like you're using NetLogo Web in standalone mode.
If the above error is being caused by an unimplemented primitive, we recommend a quick visit to
NetLogoWeb.org
to see if the primitive has been implemented in the most up-to-date version.