Skip to content

Selection: CASE · ⁨选择:CASE⁩

English

CASE OF picks one branch

  • A CASE runs the branch whose value matches the variable.
  • Branches are tested in order. The first match runs, and the rest are skipped.
  • OTHERWISE is the branch for every other value. It comes last.
中文

CASE OF 选择一个分支

  • CASE 运行与变量的值相匹配的那一支。
  • 分支按顺序测试。第一个匹配的运行,其余跳过。
  • OTHERWISE 是其余所有值的分支。它放在最后。

Handout

Log in or create account · ⁨登录或创建账户⁩

IGCSE, A-Level · ⁨IGCSE、A-Level⁩ & AP · ⁨与 AP⁩