|
![](/i/fill.gif) |
On Fri, 10 Mar 2000 12:21:22 +0100, Axel Baune
<aba### [at] neuro informatik uni-ulm de> wrote:
>Hello,
>
>PoD wrote:
>> Then use a while loop and nothing is lost, except that you've made your
>> script hard to read. There's probably an easier way to do it using
>> for()
>
>No, you couldn't do everything with a for-loop what you could do with a
>while-loop. The while-loop is far more flexible, beacuse the for-loop is
>a special case of the while-loop for cases where _one_ variable is
>looped through a range of values with a constant step width.
Did the man say he wanted to *replace* the while-loop, or does he
perhaps want to supplement the while-loop with a for-loop? I see
nothing wrong with having a for-loop in POV. For many situations, it
would be easier for newcomers to understand and it would work
perfectly. The for-loops I have used in the past have also allowed a
STEP parameter that defined the amount of increment for each loop. One
wouldn't have to be limited to incrementing or decrementing by one.
Later,
Glen Berry
Post a reply to this message
|
![](/i/fill.gif) |