next up previous contents index
Next: Contexts Up: Built in functions Previous: List Manipulation   Contents   Index

Program Flow

case(...)

case switching statement

write(
  case(X<Y then 'less than'
       X=Y then 'equal to'
                'more than'))
if(Expr then Do else Else)

can also be written as: if(Expr Then Else)

abs(X) := if(X<0 then -X else X)

if(Expr then Do)

The else clause can be omitted; can also be written as if(Expr Then)

if(X>0 'positive')

halt

exits the program
halt(X)

exits program with exit code X


chris mungall 2006-02-09