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

DOIF

From Creatures Wiki
Revision as of 22:36, 2 February 2006 by Alexwatson (talk) (c2e caos)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

DOIF is a CAOS command controlling flow.

Usage

Syntax: DOIF cond (condition) ..

DOIF is part of a set of commands used for conditional execution of code. It marks the start of a code block to execute if cond is true. It must be followed by another conditional execution marker: ELIF, ELSE or ENDI.

Some valid patterns for DOIF.. code are:

  • DOIF .. ENDI
  • DOIF .. ELSE .. ENDI
  • DOIF .. ELIF .. (ELIF ..) ENDI
  • DOIF .. ELIF .. (ELIF ..) ELSE .. ENDI

where .. indicates a code block for execution under conditions.

Examples

Editnorn.png This stub could use more information.

See also