Using the for(;;) loop in Awk, and the C preprocessor, in a project called cppawk, I created a loop facility that has multiple clauses of different types, that can combine in parallel or as Cartesian-product, and are programmer-definable.
https://www.kylheku.com/cgit/cppawk/tree/cppawk-iter.1
The above manual page includes an example of how to define an alpha_range clause that iterates over string ranges like alpha_range(var, "000", "999") or alpha_range(var, "AAA", "ZZZ").
There is a conditional clause if(...) which takes a condition and another clause as arguments. The iteration of the other clause is suspended while the condition is false.
At the shell prompt: add the values of the odd integers in the range 1 to 50.
$ cppawk '
> #include <iter.h>
>
> BEGIN {
> loop (range (i, 1, 50),
> if (i % 2 == 1, summing (sum, i)))
> ;
> print sum
> }
> '
625
Though
if is an Awk keyword, this isn't a problem because if is a clause, not an ordinary expression. Moreover, though the clause is defined by macros, none of them are called
if; they have
if embedded in their name.