ZenScript main repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

switch.zs 304B

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. }