|
|
Current 3.7 release. Small thing, but happened to notice a couple
missing back slashes in the debug statements at the bottom of the
example code in section 3.3.1.8.2.
---------------------------
3.3.1.8.2 Functions and Macros
...
You can pass functions to macros, how to do this is best explained by an
example:
#macro Foo( Bar, X )
#declare Y = Bar(X);
#declare Z = Bar(Y);
#end
#declare FUNC=function(n){n+2}
Foo(FUNC, 1)
#debug str(Y,5,5)
#debug "n"
#debug str(Z,5,5)
#debug "n"
----------------------------
Those two '#debug "n"' lines should I believe read '#debug "\n"'.
Bill P.
Post a reply to this message
|
|
|
|
On 06/22/2014 11:20 AM, William F Pokorny wrote:
> Current 3.7 release. Small thing, but happened to notice a couple
> missing back slashes in the debug statements at the bottom of the
> example code in section 3.3.1.8.2.
>
> ---------------------------
> 3.3.1.8.2 Functions and Macros
>
> ...
>
> You can pass functions to macros, how to do this is best explained by an
> example:
>
> #macro Foo( Bar, X )
> #declare Y = Bar(X);
> #declare Z = Bar(Y);
> #end
>
> #declare FUNC=function(n){n+2}
>
> Foo(FUNC, 1)
>
> #debug str(Y,5,5)
> #debug "n"
> #debug str(Z,5,5)
> #debug "n"
> ----------------------------
>
> Those two '#debug "n"' lines should I believe read '#debug "\n"'.
>
> Bill P.
good eye ... fixed
http://wiki.povray.org/content/Reference:Function#Functions_and_Macros
Post a reply to this message
|
|