POV-Ray : Newsgroups : povray.newusers : Error-while loop : Re: Error-while loop Server Time
29 Jul 2024 22:24:12 EDT (-0400)
  Re: Error-while loop  
From: Daniel Hulme
Date: 17 Feb 2005 12:05:41
Message: <20050217170539.68fdeec9@dh286.pem.cam.ac.uk>
> #declare row=0;
> #while (row < 24)
> #declare col=4;
> #while (col<16)
> object {T_chair translate <col, 0, row>}
> #declare col=col+4;
> #end
> #declare row=row+6;
> #end
> 
> #declare row=0;
> #while (row < 24)
****************^^ This termination condition will never be reached.
row starts out as 0 and decreases, so it will always be < 24.
> #declare col=-4;
> #while (col>-16)
> object {T_chair translate <col, 0, row>}
> #declare col=col-4;
> #end
> #declare row=row-6;
> #end

btw, it is usual in POV-Ray to start your variable names with a capital
letter (Row, Col) because lowercase names might have some special
meaning in a future version of POV-Ray.

Daniel

-- 
I went to the CO guess what he told me guess what he told me | apologies
He said  boy u better learn to like Win  no matter what u do | to Prince
But  he's  a  fool,  'cos  nothing  compares,  nothing  compares  2  GNU
http://surreal.istic.org/ | A tidy desk is the product of an empty mind.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.