Text-only Table of Contents (frame/ no frame)
(12) Logic Control Constructs Previous Top Next

Logic Control Constructs                 



try:
x=34;
y=26;

if x>y
    z=1
elseif x==y
    z=0
else
   z=-1
end


month ='april';
switch month
case{ 'january' 'march' 'may' 'july' 'august' 'october' 'december'}
      days=31
case { 'april' 'june' 'september' 'november' }
     days =30
case {'february' }
      days=28
otherwise
      days=-1
end






Previous Top Next


Logic_Control.src  last modified Feb 11, 2014 Introduction Table of Contents
(frame/no frame)
Printable
(single file)
© Dartmouth College