POV-Ray : Newsgroups : povray.advanced-users : problem using ORs and strcmp() in #switch/#case : Re: problem using ORs and strcmp() in #switch/#case Server Time
25 Apr 2024 11:06:53 EDT (-0400)
  Re: problem using ORs and strcmp() in #switch/#case  
From: Bald Eagle
Date: 7 Nov 2017 16:10:01
Message: <web.5a02208b1346e9e0c437ac910@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:

> The problem seems to be with my use of ORs in the #case; they seem to be
> screwing up the results somehow. The *successful* (strcmp(IMG_TYPE,AA) + 1000))
> comparison value is being ignored or overridden, or something!

Right - I think that you can't use case() like that.

I think the Boolean comparison might yield a 0 or a 1, thus nothing ever returns
1000.

Maybe you ought to do a regular
#if (comparison1 | comparison2 | comparison3)
#declare Trigger = 1000;
#end

Then proceed as you're doing.

Or whatever else that leads you to recoding...


Post a reply to this message

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