This returns the same value as the fire function. Returns a 0 if nothing found, or the distance to the robot detected, if one is found. Using the radar causes a slight delay in the robot's instruction processing. The robot stops when it gets to the specified coordinates. A 0 means that the robot was not damaged.
Any positive value means that the robot was damaged.
The side from which the collision took place is indicated by the value, as shown on the diagram below. This initiates the robots self repair facilities. Repairing clears any existing goto command, and stops the robot moving. Comments on the right of the code should help to explain what it does.