mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 18:10:43 +01:00
67 lines
1.1 KiB
XML
67 lines
1.1 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
<root>
|
|
<name>{} (curly braces)</name>
|
|
|
|
<category>Structure</category>
|
|
|
|
<subcategory></subcategory>
|
|
|
|
<usage>Web & Application</usage>
|
|
|
|
<example>
|
|
<image></image>
|
|
<code>
|
|
int[] a = { 5, 20, 25, 45, 70 };
|
|
|
|
void setup() {
|
|
size(100, 100);
|
|
}
|
|
|
|
void loop() {
|
|
for(int i=0; i<a.length; i++) {
|
|
line(0, a[i], 50, a[i]);
|
|
}
|
|
}
|
|
</code>
|
|
</example>
|
|
|
|
<description>
|
|
Define the beginning and end of functions blocks and statement blocks such as the <b>for()</b> and <b>if()</b> structures. Curly braces are also used for defining inital values in array declarations.
|
|
</description>
|
|
|
|
<syntax>
|
|
{ <c>statements</c> }
|
|
{ <c>ele0</c>, ..., <c>eleN</c> }
|
|
</syntax>
|
|
|
|
<parameter>
|
|
<label>statements</label>
|
|
<description>any sequence of valid statements</description>
|
|
</parameter>
|
|
|
|
<parameter>
|
|
<label>ele0 ... eleN</label>
|
|
<description>list of elements separated by commas</description>
|
|
</parameter>
|
|
|
|
<returns></returns>
|
|
|
|
<related>
|
|
() (parentheses)
|
|
</related>
|
|
|
|
<availability>1.0</availability>
|
|
|
|
<type>Operator</type>
|
|
|
|
<partof>PDE</partof>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</root>
|