Menu

#747 Allow optionally repeated DO/LOOP repetitor and conditional

None
unread
nobody
None
none
1
2019-03-06
2019-03-06
Erich
No

It would be nice if the DO/LOOP syntax would allow repeated use of both the repetitor and the conditional.

If commas (tbd; or a special keyword) were used as separators between repetitors, this might look like

-- swap at most 5 leading with 5 trailing chars
do 5, heads = 1 to s~length, tails = s~length to 1 by -1 while heads < tails
  c = s[i]; s[i] = s[j]; s[j] = c
end

Discussion

Anonymous
Anonymous

Add attachments
Cancel