[REBOL] Re: Loop with negative count
From: lmecir:mbox:vol:cz at: 28-Dec-2006 9:17
> * Gregg Irwin <greggirwin-mindspring.com> [061227 17:14]:
>> Hi Tim,
>> TJ> Can we reliably expect that a negative argument will be ignored?
>> So far. :) In the case of LOOP and REPEAT, it seems safe to say that
>> negative values make no sense, and will always be ignored. Others may
>> argue that REBOL should throw an error, but I imagine Carl considered
>> that behavior and chose not to do it, so you're probably safe. Maybe
>> we can get a quick answer from him to be sure though.
> to throw or not to throw, that is the question ...
> actually, always a good one to ask. I write my own code with
> a lot of throws.....
>> I wouldn't feel safe saying the same thing about all other functions.
>> For example, FORSKIP/FORALL changed, but hopefully for the better
>> since negative numbers would loop forever before, and now throw an
> Thanks Gregg
> <grin> BTW: that posting was sent on December 19. Where've y'all
> been? </grin>
>> -- Gregg
>> To unsubscribe from the list, just send an email to
>> lists at rebol.com with unsubscribe as the subject.
I received the post(s) only now (don't know why). I will add the
negative value tests requiring zero repetitions to test suite, which
seems the most expected behaviour to me and which is truly the case now.