POV-Ray : Newsgroups : povray.general : Strange behavior : Re: Strange behavior Server Time
22 Jun 2024 23:20:19 EDT (-0400)
  Re: Strange behavior  
From: scott
Date: 16 Jan 2015 03:01:42
Message: <54b8c566$1@news.povray.org>
On 16/01/2015 03:04, Anthony D. Baye wrote:
> Say I have a macro that returns values:
>
> #macro someMacroReturningAValue(params)
>      #local _RESULT = foo;
>      // do stuff here...
>      _RESULT
> #end
>
> I can use this macro in a computation, thusly:
>
> object { bar translate someMacroReturningAValue(params)*x }
>
> but I cannot set the macro as the rValue of a declaration, like so:
>
> #declare blah = someMacroReturningAValue(params);

The below code runs fine here, does it work ok on your installation? 
What are you doing differently (eg what is "params" defined as?). Can 
you produce just a few lines that others can run to reproduce the problem?

#macro someMacroReturningAValue(params)
     #local _RESULT = params * 2;
     _RESULT
#end
#local p = 1;
#declare blah = someMacroReturningAValue(p);


Post a reply to this message

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