> What if we're talking about a loop like this:
>
> #declare abortProb = 0.03;
> #while(rand(R) > abortProb)
> //...
> #end
Well rand() gives a different answer each time, so that can automatically be
counted as being reassigned in the eyes of the infinite-loop-catcher. If
you try to implement your own RNG in a macro then obviously the random
variable will be reassigned so that would also count.
> I do know I keep repeating myself, but: Why on earth try to come up with
> ever-so-complex ways to detect a broken counting #while loop without
> breaking
> other uses of the #while statement, when really the root problem is the
> absence
> of a proper #for loop?
Agreed. Although I still think you could detect some common infinite loop
situations without breaking any existing behaviour.
Post a reply to this message
|