Integer Functions
RoBOTL
Integer Functions
An integer function is an operation that returns a integral value.
RoBOTL supports four integer functions,
the first two of which allow the detection of
conditions that may
result in an error if ignored. These functions are:
- BeepersInBag or beepers_in_bag
Returns the number of beepers in the beeper bag carried by the robot.
If greater than zero then a PutBeeper
instruction can be executed safely.
- BeepersOnFloor or beepers_on_floor
Returns the number of beepers on the same square as the robot currently
occupies.
If greater than zero then a PickBeeper
instruction can be executed safely.
- XPosition or x_position
Returns the X coordinate of the square
that the robot currently occupies.
A value of 0 indicates that the robot is in the leftmost column.
- YPosition or y_position
Returns the Y coordinate of the square
that the robot currently occupies.
A value of 0 indicates that the robot is in the bottom row.
You can also go:
Created on 5 January 1996
Last revised 20 August 1996
Copyright ©1996 Walter S. Ching, n1hbr@ma.ultranet.com