\b;Programming - the CBOT language
The CBOT language is very close in structure and syntax to C++ and Java. It has been adapted for the specific purposes of COLOBOT, and for an efficient pedagogical approach.
This language is made up of instructions (see below), \l;blocks\u cbot\bloc;, \l;variables\u cbot\var;, \l;expressions\u cbot\expr; and \l;conditions\u cbot\cond;.

o  \c;\token;Instructions\norm;\n;
In the program editor, an instruction in the CBOT language is always displayed on an orange background. If an instruction hasn't got an orange background, this means that it has been misspelled. Instruction names are always written in lower case. 

o  \c;\type;Type\norm;\n;
The \l;type\u cbot\type; of a variable appears with a green background. 

o  \c;\const;Constants\norm;\n;
Constants like \l;categories\u cbot\category; are displayed with a red background. 

\t;Instructions in the CBOT language:
\c;\l;if\u cbot\if;         \n;Choice structure
\c;\l;else\u cbot\if;       \n;Alternative choice structure
\c;\l;for\u cbot\for;        \n;Loop structure
\c;\l;while\u cbot\while;      \n;Control structure
\c;\l;do\u cbot\do;         \n;Control structure
\c;\l;break\u cbot\break;      \n;Exit from a loop
\c;\l;continue\u cbot\continue;   \n;Continues the loop
\c;\l;return\u cbot\return;     \n;Exit from a function

\t;Specific instructions for bots:
\c;\l;radar\u cbot\radar;      \n;Object detection
\c;\l;direction\u cbot\direct;  \n;Calculates a rotation angle
\c;\l;distance\u cbot\dist;   \n;Calculates a distance
\c;\l;distance2d\u cbot\dist2d; \n;Calculates a distance
\c;\l;space\u cbot\space;      \n;Calculates a free space
\c;\l;wait\u cbot\wait;       \n;Waits
\c;\l;move\u cbot\move;       \n;Moves forward or backward
\c;\l;turn\u cbot\turn;       \n;Turns
\c;\l;goto\u cbot\goto;       \n;Goes to a given position
\c;\l;motor\u cbot\motor;      \n;Direct motor control
\c;\l;jet\u cbot\jet;        \n;Direct jet engine control
\c;\l;message\u cbot\message;    \n;Displays a message
\c;\l;retobject\u cbot\retobj;  \n;Returns an object from a function
\c;\l;errmode\u cbot\errmode;    \n;Error treatement control

\t;Instructions about topology:
\c;\l;topo\u cbot\topo;       \n;Returns the altitude of a point

\t;Instructions specific to some bots:
\c;\l;grab\u cbot\grab;       \n;Picks up an object
\c;\l;drop\u cbot\drop;       \n;Puts down an object
\c;\l;sniff\u cbot\sniff;      \n;Sounds the subsoil
\c;\l;thump\u cbot\thump;      \n;Overturns alien insects
\c;\l;recycle\u cbot\recycle;    \n;Recycles a derelict bot
\c;\l;shield\u cbot\shield;     \n;Extends or withdraws the shield
\c;\l;fire\u cbot\fire;       \n;Fires the cannon
\c;\l;aim\u cbot\aim;        \n;Vertical angle of the cannon

\t;See also
\l;Types\u cbot\type; and \l;categories\u cbot\category;.
