POV-Ray : Newsgroups : povray.beta-test : identifier of function : Re: identifier of function Server Time
4 Nov 2024 23:16:28 EST (-0500)
  Re: identifier of function  
From: Ron Parker
Date: 19 Sep 2001 19:14:38
Message: <slrn9qi9n1.94a.ron.parker@fwi.com>
On 19 Sep 2001 19:10:25 -0400, Ron Parker wrote:
>On 19 Sep 2001 18:47:51 -0400, Warp wrote:
>>  IIRC there's some kind of problem in passing function names as macro
>>paramters. AFAIK currently it's not possible.
>
>It may not become possible any time soon, either.  The problem is that it 
>requires more than a single token of lookahead to disambiguate between these 
>two macro calls:

However, this parses correctly and does what you expect.  I suggest that it 
might want to be written up as either a FAQ entry or as a documentation 
thingamawhatzis.  Watch out for the returning-locals-from-a-macro bug, though:

#macro Foo( Bar )
  #declare X = Bar(Y);
#end

#declare Y=1;
#declare Baz=function(n){n+2}

Foo(function(n){Baz(n)})

#debug str(X,5,5)
#debug "\n"

-- 
plane{-z,-3normal{crackle scale.2#local a=5;#while(a)warp{repeat x flip x}rotate
z*60#local a=a-1;#end translate-9*x}pigment{rgb 1}}light_source{-9red 1rotate 60
*z}light_source{-9rgb y rotate-z*60}light_source{9-z*18rgb z}text{ttf"arial.ttf"
"RP".01,0translate-<.6,.4,.02>pigment{bozo}}light_source{-z*3rgb-.2}//Ron Parker


Post a reply to this message

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