:scan
.a.
if (%result. $+ %index = ok) goto end
.b.
inc %index | goto scan
:end
command1
.c.
-
-
.a.
while (%result. $+ %index != ok) {
.b.
inc %index
.a.
}
.c.
(above is simple but contains code repeats)
-
-
var %init = $true
while (%result. $+ %index != ok) && (%init != $true) {
if (%init != $true) {
.b.
inc %index
}
.a.
%init = $false
}
.c.
(above is more complexe but limits code reproduction)