- publishing free software manuals
GNU Octave Manual
by John W. Eaton
Paperback (6"x9"), 324 pages, 4 figures
ISBN 0954161726
RRP £19.99 ($29.99)

Get a printed copy>>>

10.2 The switch Statement

The switch statement was introduced in Octave 2.0.5. It should be considered experimental, and details of the implementation may change slightly in future versions of Octave. If you have comments or would like to share your experiences in trying to use this new command in real programs, please send them to octave-maintainers at bevo.che.wisc.edu. (But if you think you've found a bug, please report it to bug-octave at bevo.che.wisc.edu.

The general form of the switch statement is

switch expression
  case label
    command_list
  case label
    command_list
  ...

  otherwise
    command_list
endswitch

Built-in Variable: warn_variable_switch_label
If the value of this variable is nonzero, Octave will print a warning if a switch label is not a constant or constant expression

ISBN 0954161726GNU Octave ManualSee the print edition