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

[] (配列アクセス)

   
Examples  
int[] numbers = new int[3]; 
numbers[0] = 90; 
numbers[1] = 150; 
numbers[2] = 30; 
int a = numbers[0] + numbers[1]; // 値を240に設定 
int b = numbers[1] + numbers[2]; // 値を180に設定

Description  

配列アクセス演算子は配列内の場所を特定するのに使われる。この場所のデータはシンタックスによって決定することができる。 array[element] = value or read with the syntax value = array[element].

   
Syntax  
datatype[]
array[element]
   
Parameters  
datatype   どんな初期データタイプ、もしくはユーザーの定義したクラスを含めた複合するデータタイプでもよい
array   どんな有効な変数名でよい

element  

整数:-1の配列の長さを超えてはならない



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