next up previous contents
Next: Macros Up: GdfidLs command language Previous: do-loops   Contents

if elseif else endif

Conditional execution of part of an inputfile is possible with if blocks.
An if block is:
  if (ARITHMETIC-EXPRESSION) then
     #
     # if-body
     #
  endif
If the ARITHMETIC-EXPRESSION evaluates to something else than '0' then the body of the If-Block is executed.

A general if block is:

  if (ARITHMETIC-EXPRESSION) then
     #
     # if-body
     #
  elseif (ARITHMETIC-EXPRESSION) then
     #
     # elseif-body
     #
  else
     #
     # else-body
     #
  endif

If-blocks may be nested.