mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 01:50:44 +01:00
70 lines
1.0 KiB
XML
70 lines
1.0 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
<root>
|
|
<name>case</name>
|
|
|
|
<category>Control</category>
|
|
|
|
<subcategory>Conditionals</subcategory>
|
|
|
|
<usage>Web & Application</usage>
|
|
|
|
<example>
|
|
<image></image>
|
|
<code>
|
|
char letter = 'B';
|
|
|
|
switch(letter) {
|
|
case 'A':
|
|
println("Alpha"); // Does not execute
|
|
break;
|
|
case 'B':
|
|
println("Bravo"); // Prints "Bravo"
|
|
break;
|
|
default:
|
|
println("Zulu"); // Does not execute
|
|
break;
|
|
}
|
|
</code>
|
|
</example>
|
|
|
|
<description>
|
|
Denotes the different labels to be evaluated with the parameter in the <b>switch()</b> structure.
|
|
</description>
|
|
|
|
<syntax>
|
|
case <c>label</c>: <c>statements</c>
|
|
</syntax>
|
|
|
|
<parameter>
|
|
<label>label</label>
|
|
<description>byte, char, or int</description>
|
|
</parameter>
|
|
|
|
<parameter>
|
|
<label>statements</label>
|
|
<description>one or more valid statements</description>
|
|
</parameter>
|
|
|
|
<returns></returns>
|
|
|
|
<related>
|
|
switch()
|
|
default
|
|
break
|
|
</related>
|
|
|
|
<availability>1.0</availability>
|
|
|
|
<type>Keyword</type>
|
|
|
|
<partof>Java</partof>
|
|
|
|
|
|
<level>extended</level>
|
|
|
|
|
|
|
|
|
|
|
|
</root>
|