Processing (BETA) version 135+ のリファレンスです。 旧バージョン使用者はソフトウェア内のリファレンスを参照してください。
この文書は Processing のAPIリファレンスを日本語に訳したものです。 最新の内容は 英語版 で確認して下さい。


Name

contract()

Examples
int[] ia = {0, 1, 2, 3, 4, 5, 6, 7};
println(ia.length);  // Prints "8"
ia = contract(ia, 5);
println(ia.length);  // Prints "5"
ia = subset(ia, 0, 5);
println(ia.length);  // Prints "5"
Description この関数は削除されたため代わりにsubset()を使用してください。 Decreases the size of an array. The required newSize parameter provides precise control over the decrease in size.
Syntax
contract(array, newSize)
Parameters
array booleans[], bytes[], chars[], ints[], floats[], or Strings[]
newSize positive int: new size for the array
Usage Web & Application
Related expand()
Updated on May 24, 2007 06:11:18pm PDT

Creative Commons License

この文書の原文はクリエイティブ・コモンズ(Creative Commons)Attribution-Noncommercial-Share Alike(表示・非営利・継承) ライセンスで公開されています。 このライセンスは同一の許諾条件の下で原作者のクレジットを表示し、また作品を営利目的で利用しなければ、作品に対して複製、頒布、展示、実演、二次的著作物の作成が行えることを示します。

© 2007 Processing.org