POV-Ray : Newsgroups : povray.general : Need math help : Re: Need math help Server Time
10 Aug 2024 09:18:43 EDT (-0400)
  Re: Need math help  
From: Chris Huff
Date: 11 Mar 2000 08:35:00
Message: <chrishuff_99-1443D5.08364911032000@news.povray.org>
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?

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

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