POV-Ray : Newsgroups : povray.beta-test : Parse warning doesn't give enough information : Re: Parse warning doesn't give enough information Server Time
15 Jun 2024 13:45:27 EDT (-0400)
  Re: Parse warning doesn't give enough information  
From: Alain
Date: 30 Jul 2011 18:12:59
Message: <4e3481eb@news.povray.org>

> During the parsing of a scene, I get the warning:
>
>     Parse Warning: Expected pure RGB color expression, unexpected filter and
>     transmit components will have no effect.
>
> The warning does not indicate what sort of statement caused it or where it
> occurred.  My attempts to narrow the problem down have been wholy unsuccessful.
>
> I get the warning in 3.7RC3, but not in 3.6.2.  I get the warning regardless of
> whether the main .pov file sets #version 3.6 or 3.7.
>
> The message appears during the parsing of an #include file that sets #version
> 3.6 and, in turn, #includes 5 other files that also set #version 3.6.  It also
> #includes colors.inc and transforms.inc, both of which set #version 3.5.  All
> the #include files reset the #version at the end.
>
> My first suspicion was that I'd used a color value as an ambient, but
> deliberately setting the ambient to rgb 0.1 (while skipping the #include file)
> did not reproduce the warning.
>
> I put #debug markers thoughout the #include file to try to locate the source of
> the warning.  Yet, when I place additional markers to try to narrow down the
> problem, or even completely comment out the section indicated by the markers,
> the warning message jumps to a place totally different from where the original
> markers indicated.  For this reason, I have been unable to come up with a
> minimal code sample to reproduce the problem.
>
> This may be a low priority issue, as it involves only a warning.  Still, it
> would be nice to know what exactly I'm being warned about.  However unlikely, it
> is possible that I'm doing something that I didn't intend.  The issue of parse
> warnings not giving enough information has come up before (the "warning
> postings" thread).
>
> My OS is the infinitely exasperating Windows 7 Ultimate.
>
>
>

It apens because you have something like this: rgb<1,1,1,1> (4 
components colour vector) or rgb<1,1,1,1,1> (5 component colour vector)

When using version 3.6.1, the first was interpreted as rgbf<1,1,1,1> and 
the second as rgbft<1,1,1,1,1>

The version 3.7 is more strict in that case, it correctly drops the 4th 
and 5th components AND informs you about it.

It can appen wherever you have an rgb statement. The warning have an 
implicit "once" that prevent having 100's of warnings if, for example, 
it occures in a loop.

It can also appen if you #declare or use an rgb value in a macro or 
function and you pass it a 4 or 5 component colour.


Alain


Post a reply to this message

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