|
|
"Kenneth" <kdw### [at] gmailcom> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> > In fact, check out:
> >
> > #switch(strcmp(IMG_TYPE,BB) | strcmp(IMG_TYPE,CC) )
> >
> > #case(-10)
> > rgb <1, 1, 0>
> > #break
> >
> > #case(-6)
> > rgb <1, 1, 1>
> > #break
> >
> > #case(1)
> > rgb <0, 0, 0.2>
> > #break
> >
> > #case(1000)
> >
> > It selects the blue pigment, which corresponds to 1.
>
> *That's* a really unexpected result, IMO; neither of the #switch's strcmp()s
> 'match' IMG_TYPE (which would be AA), yet #case(1) is chosen as if #switch is
> 'true.' And looking at it in a different brain-twisting way (one that's
> incorrect, no doubt), it seems that either #case(-6) or #case(-10) should be
> chosen, but certainly not #case(1)
It seems to me that none of the individual cases should be chosen, as neither of
the Boolean expressions evaluate to 1, which means the logical OR should return
zero - so -10, -6, 1, and 1000 should ALL be skipped, and any extant #else
should selected instead.
No POV-Ray on _this_ computer, so I can't test anything for the next 8 hours.
(which is why I'd love a simple editor/parser-no-render combo, or a true
stand-alone POV-Ray ("USB") version)
Post a reply to this message
|
|