mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 01:50:44 +01:00
65 lines
1.1 KiB
XML
65 lines
1.1 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
<root>
|
|
<name>default</name>
|
|
|
|
<category>Control</category>
|
|
|
|
<subcategory>Conditionals</subcategory>
|
|
|
|
<usage>Web & Application</usage>
|
|
|
|
<example>
|
|
<image></image>
|
|
<code>
|
|
char letter = 'F';
|
|
|
|
switch(letter) {
|
|
case 'A':
|
|
println("Alpha"); // Does not execute
|
|
break;
|
|
case 'B':
|
|
println("Bravo"); // Does not execute
|
|
break;
|
|
default:
|
|
println("Zulu"); // Prints "Zulu"
|
|
break;
|
|
}
|
|
</code>
|
|
</example>
|
|
|
|
<description>
|
|
Keyword for defining the default condition of a <b>switch()</b>. If none of the case labels match the <b>switch()</b> parameter, the statement(s) after the <b>default</b> syntax are executed. Switch structures don't require a <b>default</b>.
|
|
</description>
|
|
|
|
<syntax>
|
|
default: <c>statements</c>
|
|
</syntax>
|
|
|
|
<parameter>
|
|
<label>statements</label>
|
|
<description>one or more valid statements to be executed</description>
|
|
</parameter>
|
|
|
|
<returns></returns>
|
|
|
|
<related>
|
|
switch()
|
|
break
|
|
case
|
|
</related>
|
|
|
|
<availability>1.0</availability>
|
|
|
|
<type>Keyword</type>
|
|
|
|
<partof>Java</partof>
|
|
|
|
|
|
<level>Extended</level>
|
|
|
|
|
|
|
|
|
|
|
|
</root>
|