|
|
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
|
|
|
|
Am 10.06.2014 08:47, schrieb BH:
> 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.
Not really an error, just a quirk of the language. The following should
work:
#macro bb ()
#if (1)
#local result = 0.0;
#end
result
#end
Post a reply to this message
|
|