POV-Ray : Newsgroups : povray.documentation.inbuilt : 3.3.1.8.2 Functions and Macros. Missing back slashes. Server Time
21 Dec 2024 11:13:02 EST (-0500)
  3.3.1.8.2 Functions and Macros. Missing back slashes. (Message 1 to 2 of 2)  
From: William F Pokorny
Subject: 3.3.1.8.2 Functions and Macros. Missing back slashes.
Date: 22 Jun 2014 11:20:57
Message: <53a6f459$1@news.povray.org>
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

From: James Holsenback
Subject: Re: 3.3.1.8.2 Functions and Macros. Missing back slashes.
Date: 23 Jun 2014 09:20:16
Message: <53a82990@news.povray.org>
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

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