POV-Ray : Newsgroups : povray.general : Is this a bug? : Re: Is this a bug? Server Time
6 Aug 2024 02:24:34 EDT (-0400)
  Re: Is this a bug?  
From: Scott Wasson
Date: 19 Jun 2002 14:51:45
Message: <3d10d2c1$1@news.povray.org>
Depending on whether Condition is True or False, your example can be
rewritten as:

 //START
   #declare O=
     // Condition = True
       sphere{ y 1 rotate x*30
    /* #else
       box{ -1 1 translate z
     #end
    */
     pigment{ rgb 1}
   }
 //END

and for Condition=False:

//START
   #declare O=
     /* #if(Condition=False)
       sphere{ y 1 rotate x*30
     #else
    */
       box{ -1 1 translate z
     //#end
     pigment{ rgb 1}
   }
 //END

It's clear from these two examples that the first encounters a parsing error
in the sphere, and the second in the box.  Your example behaves exactly the
same way, except the code that is "commented out" is done dynamically by
Condition.  Again, the error will appear in either the sphere or the box
depending on whether Condition is True or False respectively.

-Scott


Post a reply to this message

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