ZenScript main repository
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

switch.zs 321B

123456789101112131415161718
  1. val test as int = 10;
  2. switch test {
  3. case 1 : println("yay"); break;
  4. case 10 : println("yo");
  5. case 100 : println("y");
  6. default: println("yup");
  7. }
  8. val test2 as string = "hello";
  9. switch test2 {
  10. case "bye" : println("hello");
  11. case "hello" : println("goodbye");
  12. default: println("hellogoodbye");
  13. }