[for start:script test:expr next:script command:script]

  .local pmc __boolean
  __boolean = get_root_global ['_tcl'], '__boolean'
  $start
loop:
  $P0 = $test
  $I0 = __boolean($P0)
  unless $I0 goto done
  push_eh command_exception
    $command
  clear_eh
continue:
  push_eh next_exception
    $next
  clear_eh
  goto loop
  
command_exception:
  .catch()
  .get_return_code($I0)
  if $I0 == TCL_CONTINUE goto continue
  if $I0 == TCL_BREAK    goto done
  .rethrow()

next_exception:
  .catch()
  .get_return_code($I0)
  if $I0 == TCL_BREAK goto done
  .rethrow()

done:
  $R = new .String
  $R = ''
