Main
Home
Quick tour
Documentation
Mailing Lists
Demonstration
Download
Sourceforge project
FAQ
History
Links


Toolboxes
Char
Control
Crypto
Finance
FunFun
General
Graphics
Image
Internal
InputOutput
LinearAlgebra
Matrix
Miscellaneous
Net
Polynomial
Set
Signal
SpecFun
SpecialMatrix
Statistics
String
System
Time
Trigonometric
...


Contact
Developers

JMathLib
A Java Clone of Octave, SciLab, Freemat and Matlab.

[Index] [Documentation] [Demonstration] [Download]

Switch

The two ways of writing switch statements are:

switch(variable)
{
    case(val1):
    {
        code1;
    }
    case(val2):
    {
        code2;
    }
    default/otherwise:
    {
        code3;
    }
};
switch(variable)
    case val1:
        code1;
    case val2:
        code2;
    default/otherwise:
        code3:
end;

Last modified
SourceForge Logo