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]

Chapter 6. Control Structures

Table of Contents

If
Switch
For
While

If

There are two ways of writing if statements

if(test1)
{
    code1;
}
elseif(test2)
{
    code2;
}
else
{
    code3;
};
if test1
    code1;
elseif test2
    code2;
else
    code3;
end;

Last modified
SourceForge Logo