|
|
Chris Huff wrote:
>
> In article <38C9B210.6698DB45@erols.com>, John VanSickle
> <van### [at] erolscom> wrote:
>
> > ... I also made local copies of the arguments, so that if the user
> > passes an expression as one of the arguments, that expression will be
> > evaluated. For instance, this macro
> >
> > #macro MyMacro(A,B) (A-B) #end
> >
> > can be invoked this way:
> >
> > #local J=MyMacro(77*2,45*2-23*3);
> >
> > which POV-Ray will evalaute as:
> >
> > #local J=77*2-45*2-23*3;
> >
> > which is almost certainly *not* what the user wanted.
>
> POV always evaluates the parameters, which is one of it's differences
> with C macros.
> See this section in the manual: 4.2.8.3 Are POV-Ray Macros a Function
> or a Macro?
Hmm, the docs back you up on this. I guess that I do it this way because
it fixed a bug I had somewhere...
--
ICQ: 46085459
Post a reply to this message
|
|