インフォ FAQ
言語 環境比較
 
Index
 
  Processing 1.0 _ALPHAリファレンスは開発途中である。
もしエラーやコメントがあれば、reas at groupc.netへメールして下さい。
Name  

else

   
Examples  
for(int i = 5; i < 95; i += 5) { 
  if(i < 35) { 
    line( 30, i, 80, i ); 
  } else { 
    line( 20, i, 90, i ); 
  } 
} 
for(int i = 5; i < 95; i += 5) { 
  if(i < 35) { 
    line( 30, i, 80, i ); 
  } else if (i < 65) { 
    line( 20, i, 90, i ); 
  } else { 
    line( 0, i, 100, i ); 
  } 
} 
Description  

if()構造を拡張し、プログラムに2つかそれ以上のコードのブロックを選択させる。if() の式が の時、コードのブロックを実行する。

 

   
Syntax  
if(expression) { 
  statements 
} else { 
  statements 
} 

if(expression) { 
  statements 
} else if(expression) { 
  statements 
} else { 
  statements 
}
   
Parameters  
expression  

真が偽かを実行する有効な条件

 

statements   実行される一つかそれ以上の式
   
Usage   Web & Application
   
Related   if()
   
© 2004- 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea
Processing is an open project initiated by Ben Fry and Casey Reas