[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
switch/case
From: |
John W. Eaton |
Subject: |
switch/case |
Date: |
Fri, 27 Oct 2000 15:15:01 -0500 |
On 31-Aug-2000, Helgi Tomasson <address@hidden> wrote:
| What is the current status on the switch case . In the enclosed program
|
| octave -2.0.16 does not like that method can be either a 6 characer
| thing
| or an 8 character thing. If I add two blanks, i.e.
|
| method='linear '
|
| and similarly in the case statement thing seem OK.
|
| function method(method,...)
|
| switch method;
| case 'linear';
| disp ('method is linear');
| case 'bilinear';
| disp ('method is bilinear');
| endswitch;
| endfunction
|
|
| In Matlab I think the following should work
|
| switch method;
| case {'linear','quasi-linear'};
| disp ('method is linear or quasi-linear'};
| case 'bilinear';
| disp ('method is bilinear');
| endswitch;
Thanks to Paul Kienzle <address@hidden>, the current
CVS sources handle these cases correctly.
jwe
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- switch/case,
John W. Eaton <=