FANDOM


The extern instruction determines the function that acts as main program of a robot. The name of the function declared with extern will appear in the program list in the lower left corner of the screen.

extern void object::MowDown()
{
   while ( true )
   {
       fire(1);
       turn(10);
   }
}

If the program contains other functions, only the main function must be preceded by extern.

extern void object::Square( )
{
    for ( int i=0 ; i<4 ; i++ )
    {
        Line(10);
    }
}

void object::Line(float dist)
{
    move(dist);
    turn(90);
}

See also: Programming

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.