POV-Ray : Newsgroups : povray.general : #while loop problem : Re: #while loop problem Server Time
10 Aug 2024 01:17:48 EDT (-0400)
  Re: #while loop problem  
From: Warp
Date: 29 Mar 2000 03:50:51
Message: <38e1c3ea@news.povray.org>
This is a surprisingly common mistake. I remember someone trying to make
a merge of several objects in a loop and he made:

#while(whatever)
  merge
  { object { Object }
  }
#end

(which makes lots of merges with one object inside them)
instead of doing it (correctly):

merge
{ #while(whatever)
    object { Object }
  #end
}

(which creates just one merge with lots of objects inside it)

  This case seems similar.

#while(whatever)
  difference
  { object { Object1 }
    object { Object2 }
  }
#end

(which makes lots of differences with two objects)
instead of:

difference
{ object { Object1 }
  #while(whatever)
    object { Object2 }
  #end
}

(which makes one difference with lots of objects).

  I don't know of any way to avoid this kind of misconceptions other than
learning the basics of programming.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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