RoBOTL

DefineInteger definition


DefineInteger integer_id ;

This defines an integer variable by the name integer_id that will be maintained by each robot of this type (as being defined by the NewRobotType definition). Each robot of this type will have its own variable to maintain. There is no way to share a variable between robots.
The DefineInteger definition can also be specified using define_integer.
Example:
define
{
   NewRobotType beeper_bot
   {
      IsLikeA basic_bot;
      DefineInitialBeepers 5;
      DefineInteger beepers_dropped;
   }
}
execute
{
   new beeper_bot kathy at 5,4;
   tell kathy:
   {
      beepers_dropped = 0;
      while (BeepersInBag > 0)
      {
         PutBeeper;
         beepers_dropped = beepers_dropped + 1;
      }
   }
}

Other definitions:
You can also go:

Created on 7 January 1996
Last revised 27 January 1997
Copyright ©1996,1997 Walter S. Ching, n1hbr@ma.ultranet.com