default

本参考资料用于Processing 3.0+。 如果你使用的是前一版本,请在使用软件帮助菜单内的参考资料。. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Core Javadoc and Libraries Javadoc.

名称

default

示例
 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;


  } 
描述 Keyword for defining the default condition of a switch. If none of the case labels match the switch parameter, the statement(s) after the default syntax are executed. Switch structures don’t require a default.
语法
 default: statements 
参数
statements one or more valid statements to be executed
相关 switch
break
case

Updated on October 2, 2018 05:02:16pm EDT

default