POV-Ray : Newsgroups : povray.general : Need math help : Re: Need math help Server Time
10 Aug 2024 09:17:24 EDT (-0400)
  Re: Need math help  
From: John VanSickle
Date: 11 Mar 2000 15:30:41
Message: <38CAAF70.7148E33C@erols.com>
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

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