Welcome to the Creatures Wiki! Log in and join the community.

Difference between revisions of "ELSE"

From Creatures Wiki
Jump to navigation Jump to search
 
Line 1: Line 1:
'''ELSE''' is a [[CAOS]] command controlling flow.  It gives your [[DOIF]] statement something to do if all else fails.  It's good practice to include this in your DOIF statements to improve the flexibility of your agents.
+
'''ELSE''' is a [[CAOS]] command controlling [[Flow (CAOS)|flow]].  It gives your [[DOIF]] statement something to do if all else fails.  It's good practice to include this in your DOIF statements to improve the flexibility of your agents.
  
 
==Usage==
 
==Usage==

Latest revision as of 07:53, 29 September 2018

ELSE is a CAOS command controlling flow. It gives your DOIF statement something to do if all else fails. It's good practice to include this in your DOIF statements to improve the flexibility of your agents.

Usage[edit]

Syntax: ELSE ..

Used within a DOIF..(ELIF..)ENDI block. If the conditions in none of the preceding DOIF or ELIF commands have been true, the following code block is executed. Must be followed by an ENDI command.

See DOIF for more on conditional execution.