Skip to content
ExamplesOpen editor ↗

tlwaelo

→ default

Runs when no `tsela` in the `tlhopha` matched the value.

tlwaelo: ...

tlwaelo is the fall-back branch. It takes no value — just the keyword and a colon — and is conventionally written last in the tlhopha. It is optional: without it, a value that matches nothing simply does nothing. Including it means your code still has an answer when the value is one you did not anticipate.

The fall-back branch catches every other number
tiro setaLoeto() {
  thalaKanefase(400, 200);
  bokamorago(220);
  gopheta (diri i = 0; i < 4; i = i + 1) {
    tlhopha (i) {
      tsela 1:
        tlatsaMmala(220, 60, 60);
        kgaola;
      tlwaelo:
        tlatsaMmala(120, 120, 120);
    }
    thalaKhutlonne(i * 96 + 26, 60, 72, 72);
  }
}

tlhopha, tsela, kgaola