Skip to content

CASE chooses among values

  • CASE OF compares one variable against several values.
  • It is tidier than many IFs when each value gives a fixed result.
  • The block ends at ENDCASE.

CASE OF Grade with Grade = 2: the value 1 does not match, 2 matches and outputs Silver, 3 is skipped

Handout

Log in or create account

IGCSE, A-Level & AP