Next: enter() Up: MacAnova Help File Previous: else   Contents

elseif

Usage:
if (Logical1){command1;command2;...} elseif (Logical2){...}[else{...}]



Keywords: syntax, control
                                  Usage
'elseif' is a syntax element used in conjuction with 'if' and optionally
with 'else'.

A typical usage would be
  Cmd> if(x > 1){y <- 1}elseif(x < 0){y <- -1}else{y <- 0}

The condition tested (x < 0 in the example) must be a scalar LOGICAL
variable or expression.  The immediately following '{' must be on the
same line as elseif.

Type help("if") for complete information.


Gary Oehlert 2005-08-12