Skip to content

dirisa

The body runs first, and the condition is checked afterwards.

dirisa goes together with nako: the body sits in braces after dirisa, and the condition follows in nako (…) at the end, closed by a semicolon. The difference between dirisa … nako and a plain nako loop is that the body always runs at least once, even when the condition is false from the start. It fits when the work has to happen before you can know whether to repeat it.

dirisa { ... } nako (seemo);
Rings shrinking from large to small
tiro setaLoeto() {
  thalaKanefase(400, 200);
  bokamorago(220);
  tlogelaGoTlatsa();
  mothaloMmala(0, 90, 160);
  boketeMothalo(3);
  diri bogolo = 160;
  dirisa {
    kgolokwe(200, 100, bogolo);
    bogolo = bogolo - 24;
  } nako (bogolo > 0);
}

nako, gopheta, kgaola, tlola