help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

multiple case components in switch-case statement


From: Ferdinand Schinagl
Subject: multiple case components in switch-case statement
Date: Thu, 22 Oct 1998 09:32:22 +0100

Hi there,

I found out that matlab's sytax for the switch
statement enables checking of multiple alternatives
within a single case directive:

        SWITCH switch_expr
          CASE case_expr,
            statement, ..., statement
          CASE {case_expr1, case_expr2, case_expr3,...}
            statement, ..., statement
         ...
          OTHERWISE,
            statement, ..., statement
        END

To my knowledge, however, octave does not support
things like

str = "asdf"
.
# some code
.
switch str
case "a"
  # do thing 1
case "b"
  # do something
case "asdf"
  # do it!
endswitch
 
Is this feature available in octave version 2.0.13,
or planned for 2.1.x versions?

Best regards,
Ferdinand.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]