[Top][All Lists]

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

Built-in function for `switch'

From: John W. Eaton
Subject: Built-in function for `switch'
Date: Fri, 28 Feb 1997 01:35:57 -0600

On 27-Feb-1997, Habibie Sumargo <address@hidden> wrote:

| Dear Octave developer(s),

Uh, that would be me.

| I am wondering if octave-2.0 has a built-in function to support `switch'
| statement like C language, i.e.: 
|       switch arg:
|       {
|               case 1: ...
|                       break;
|               case 2: ...
|                       break;
|               default: ...
|       }

No.  I have considered adding something like this, but probably with a
syntax that matches the current language a little better, maybe using 
switch and endswitch keywords.

For now, you have to use if/elseif/else/endif.

I believe that the MathWorks web site mentions that MATLAB 5 supports
a switch statement.  Does anyone know what syntax it uses?



reply via email to

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