Used in conjunction with a gosub statement.
Allows you to define the return point of the gosub statement.
Example:
write to player logbook = 1
write to player logbook = 2
gosub mix.numbers
write to player logbook = 3
write to player logbook = 4
return null
mix.numbers:
write to player logbook = 5
endsub
In this case the numbers would be written to the logbook in the following order, 1, 2, 5, 3 and 4 due to the 'gosub' causing 3 and 4 to be put after 5. After 5 was written the 'endsub' statement causes a return to immediatly below the 'gosub' statement resulting in 3 and 4 being written after 5. (5 would not be written twice due to the 'return null' being encountered)
Command Location:
- »» General Commands
- »» Flow Control
endsub
- »» Flow Control