DescriptionIteratively expands the body argument while cond evaluates to non-null. Returns
the concatenated result of the evaluated bodies.
- Both arguments should be quoted to defer evaluation.
- cond is not evaluated until body has been expanded at least once.
- %do() is patterned after the C do loop.
- %do() and while differ in that %do() will immediately expand body and then
- %do() does not have a local context, so you don't need to use %gset().
- If the macro max-iteration is defined, it sets an upper limit to the number
%set(i,3) %do('I=%i%<br>%crlf% %set(i,%iadd(1,%i%)), '%lt(%i%,6)) "At the end, I=%i%" I=3 I=4 I=5 "At the end, I=6"