POV-Ray : Newsgroups : povray.unofficial.patches : #if within statements. A bug? : #if within statements. A bug? Server Time
2 Sep 2024 18:15:27 EDT (-0400)
  #if within statements. A bug?  
From: omniVERSE
Date: 20 Oct 1999 02:03:54
Message: <380d5b4a@news.povray.org>
When something doesn't work like I want I usually work around it, just
thought I'd ask what others thought and see if I'm doing things right in the
first place.
When a '#if' or '#switch' directive (others possibly?) is applied within a
'pigment' or 'finish' statement for example, the parser errors on it.  The
same thing is apparently okay in official POV 3.1g yet not so in 3.1e
(UVPov, Super Patch).
Like:

object {TestIf
 pigment {
  #if (DoThis)
   rgb<1,1,1>
  #else
   rgb<0,0,0>
  #end
 }
 finish {ambient .1
  #if (DoThis)
   diffuse .6
  #else
   diffuse 0
  #end
 }
}

Won't parse.  I even had a '#while' loop refuse to work in one file and yet
do so in another, both in official POV 3.1g oddly enough.  So I don't know
if the parser (pvengine for that matter) is glitching on it or what might be
happening.  Anyone else experience this kind of thing?

Bob
--
// omniVERSE
// http://users.aol.com/inversez/


Post a reply to this message

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