POV-Ray : Newsgroups : povray.unofficial.patches : Sniffing UberPOV : Re: Sniffing UberPOV Server Time
17 Aug 2022 10:36:54 EDT (-0400)
  Re: Sniffing UberPOV  
From: Cousin Ricky
Date: 8 Mar 2021 13:30:17
Message: <60466d39$1@news.povray.org>
On 2021-03-06 6:53 PM (-4), Bald Eagle wrote:
> "Mr" <nomail@nomail> wrote:
> 
>>> My first (and so far only) idea was to start with a test for the
>>> existence of the variable 'unofficial', but it turns out POV-Ray 3.8
>>> does the same test--but treats it as if it were a keyword.  This screws
>>> up the test for any SDL code running under 3.8.
>>
>> Yes.
>> I believe you're searching for the combination of this :
>>
>> #ifdef(unofficial)
>>
>> with a more narrowed patch version number that belongs only to uber pov such as:
>>
>> #if(unofficial = \"patch\") #if(patch(\"upov-reflection-roughness\") > 0)
> 
> 
> in qtpovray3.8:
> 
> #ifdef (unofficial)
> Parse Warning: Trying to test whether a reserved keyword is defined. Test result
> may not be what you expect.
> #declare U = unofficial;
> Parse Error: Expected 'RValue to declare', unofficial found instead
> #declare P = patch;
> Parse Error: Cannot pass uninitialized identifier to non-optional LValue.
> #debug unofficial
> Parse Error: Expected 'string expression', unofficial found instead
> #debug patch
> Parse Error: Expected 'string expression', undeclared identifier 'patch' found
> instead

Exactly.  The results are the same in official POV-Ray 3.8.  The problem 
is that the test on 'unofficial' is reliable _only_ with a patch that 
uses it--which is exactly what we don't know in advance; and any further 
refined tests are pointless.

I'll just go ahead and assume that the user is using official POV-Ray, 
and have them set a flag variable if they are using a 3.7.1-based patch.


Post a reply to this message

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