POV-Ray : Newsgroups : povray.beta-test : function declaration and namespace : Re: function declaration and namespace Server Time
30 Jul 2024 10:17:57 EDT (-0400)
  Re: function declaration and namespace  
From: Tor Olav Kristensen
Date: 7 Jan 2002 19:05:07
Message: <3C3A373B.2AB132D2@hotmail.com>
Thorsten Froehlich wrote:
> 

> Skiba <abx### [at] babilonorg>  wrote:
> 
> > This is parsed ok:
> >
> > #macro P(F) #end
> > #local F=function{x}
> >
> > and this not:
> >
> > #local F=function{x}
> > #macro P(F) #end
> 
> Ah, now I see.  I missed that it wasn't a macro call.  I am not sure what it
> is then.

It is just one function declaration and one
macro declaration.

- And the macro's parameter just happens to
have the same name as the function.

I think it should be valid code to write. 

Just as this is allowed:

#declare S = sphere { <0, 0, 0>, 1 }

#macro AnyMacro(S)
  (2*S)
#end // AnyMacro

#declare A = AnyMacro(4);


Tor Olav


Post a reply to this message

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