|
![](/i/fill.gif) |
In article <8FA4E57A0seed7@204.213.191.228>, ing### [at] home nl (ingo)
wrote:
> Think about it with an absolute non-programmer mind.
Easier said than done.
> When I first encouterd a loop, it took men an hour to realize that I had
> to do the incrementing myself. I expected it to be automatic.
This is done for flexibility and ease of coding...a variable is just a
variable, whether you use it as a counter or not, how is POV supposed to
know it needs to be incremented when the loop ends? Also, there are
times when you want to increment the loop by a different amount, and
times when you don't even want to use an incrementing variable for
control. Loops aren't only used for making several copies of an object.
> It took me a day to figure out I had to reset the counter of the inner
> loop myself. For me it seemed very logical that once I had gone through
> the loop the counter would not exist anymore until the loop was enterd
> again.
This could make sense if you created the variable inside the outer loop
in many other languages, but if you create it outside both loops, why
would you expect it to be destroyed when the outer one loops back to
it's start?
Anyway, POV seems to only have variables local to files and macros. With
a separate keyword for modifying variables, like what my #set patch
implements, it would be possible to use variables local to any block,
like #if statements and #while loops, but I don't expect that to happen
for a while, if ever.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
![](/i/fill.gif) |