Decisions

From TNT

Jump to: navigation, search

Made with commands if, else and end. Every if has to be matched by an end (or, optionally, an else), and every else has to be matched by an end. General form:


   if ( condition )
      actions A, decisions A ...
   else
       actions B, decisions B ...
   end

If the condition that follows the if is different from 0, then actions/decisions A are executed, otherwise actions/decissions B are executed. There can be any number of nested if/else's.

Personal tools