POV-Ray : Newsgroups : povray.bugreports : Possible error of nested #if inside #macro : Possible error of nested #if inside #macro Server Time
25 Apr 2024 00:55:20 EDT (-0400)
  Possible error of nested #if inside #macro  
From: BH
Date: 10 Jun 2014 02:50:01
Message: <web.5396a9a2fecb1201f9bb8ced0@news.povray.org>
This is a report on a possible error of nested #if~#end inside #macro~#end.

The rendering using following code was found to be failed.
An error message, "line 5: Parse Error: All #declares of float, vector, and
color require semi-colon ';' at end if the language version is set to 3.5 or
higher. Either add the semi-colon or set the language version to 3.1 or lower.",
was obtained.

// ------------------------------------------------------------------------
#version 3.7;

#macro bb ()
    #if (1)
        0.0
    #end
#end

sphere{<0.0, 0.0, 0.0>,1.0 pigment{color <1,0,0>}}

#declare aa = 1.0 + bb ();

#if (1)
    #declare cc = <0.0, 0.0, 0.0>;
#end
// ------------------------------------------------------------------------


However, when I used next code, the rendering was succeeded correctly.  The
nested #if~#end inside #macro~#end has been removed using comment out in the
revised next code.
I confirmed following. As you see, the later #if~#end, which is NOT nested in
the other conditional directives such as #macro~#end, was processed
successfully.  Therefore, this may be an error only in the nested #if~#end
inside #macro~#end.


// ------------------------------------------------------------------------
#version 3.7;

#macro bb ()
    //  #if (1)
        0.0
    //  #end
#end

sphere{<0.0, 0.0, 0.0>,1.0 pigment{color <1,0,0>}}

#declare aa = 1.0 + bb ();

#if (1)
    #declare cc = <0.0, 0.0, 0.0>;
#end
// ------------------------------------------------------------------------

POV-Ray's version in this renderings is 3.7.0.msvc10.win64, runnning on Windows
8.1 Pro (64 bits, language: Japanese).
That's all this report on a possible error.

Sorry for poor at English.  Sincerely


Post a reply to this message

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