RoBOTL

execute block


execute { statements }


The execute block contains all the executable statements, which include the place, new, remove, tell, and iterate statements.

The state of the world and the type of available robots must be defined prior to the start of execution. As such, a define block, if present, must occur before the execute block.


define
{
   WorldEntity sample_world
   {
      wall from 2,2 north for 10;
   }
   NewRobotType sample_bot
   {
      IsLikeA basic_bot;
      DefineInitialBeepers 5;
      DefineNewInstruction turnright as
      {
         iterate 3 times TurnLeft;
      }
   }
}
execute
{
   place sample_world at 0,0;
   new sample_bot mybot at 5,8;
   tell mybot: turnright;
   remove mybot;
}

You can also go:

Created on 20 August 1996
Last revised 20 August 1996
Copyright ©1996 Walter S. Ching, n1hbr@ma.ultranet.com