|
![](/i/fill.gif) |
>On Mon, 07 Jan 2002 13:18:44 +0100, "Thorsten Froehlich" <tho### [at] trf de>
>wrote:
>> Semicolons are listed as required after every #local, #declare and #version
>> with a float, vector or color value. If you don't include the required
>> semicolon the problem is in your scene and the parser reports it as soon as
>> it is possible to report this.
>
>I think you misunderstand my report so I post shorter example:
>
>#macro Test2() #if(yes) 2 #end #end
>#local F=Test2();
>
>note: there is semicolon but parser expects object or directive
But POV macros behave as if they were *macros* not functions.
If POV macros behaved like *functions* then Test2() would return the
value "2". "2" is a float, so you'd expect a semicolon to be
permissible.
Since POV macros behave like *macros*, Test2() behaves as if it returns
the code "#if(yes) 2 #end".
So
#macro Test2() #if(yes) 2 #end #end
#local F=Test2();
behaves like the illegal statement
#local F=#if(yes) 2 #end;
Note that this is legal:
#macro Test2() (#if(yes) 2 #end) #end
#local F=Test2();
Because that behaves like the legal statement
#local F=(#if(yes) 2 #end);
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
![](/i/fill.gif) |