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

setup()

   
Examples  
void setup() { 
  size(200, 200); 
  background(0); 
  noStroke(); 
  fill(102); 
} 
 
int a = 0; 
 
void loop() { 
  rect(a++%width, 10, 2, 80); 
} 

Description  

プログラムが一度走りはじめるとよばれる機能。loop() が実行され、スクリーンにイメージが描かれる前に、例えば、スクリーンの大きさや、背景色、ロードするイメージなど、初期の環境の属性を決定するために使われる。setup()内に宣言された変数はloop()の中ではアクセスできない。

 

   
Syntax  
void setup() {
  statements
}
   
Parameters  
statements   どんな有効な命令文でもよい

   
Returns   None
   
Usage   Web & Application
   
Related   loop()
size()
   
© 2004- 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea
Processing is an open project initiated by Ben Fry and Casey Reas