POV-Ray : Newsgroups : povray.beta-test : function declaration and namespace : Re: function declaration and namespace Server Time
2 Nov 2024 07:27:41 EDT (-0400)
  Re: function declaration and namespace  
From: Gleb
Date: 7 Jan 2002 09:23:57
Message: <3c39af7d@news.povray.org>
The difference is not only the order of lines, but in the last case "F" in
known as function name

in current block, so POV is correct, reporting an error..

If we put " #local F=" inside e.g. a macro block, like below, it works OK

//----------------------------
 #macro  M(F)
 #local F=function{x}
 #end

 #macro P(F) #end

 /*----------------------------
 6.2.2.2  #declare vs. #local

 Use of #local in the main scene file (not in an include file and not in a
macro)
  is identical to #declare.
  For clarity sake you should not use #local in a main file except in a
macro.
 */


atb,

gleb


"W?odzimierz ABX Skiba" <abx### [at] babilonorg> wrote in message
news:ps5j3u42jdj85v0jfr3jeaj8e2i2vn3qsa@4ax.com...
> On Mon, 07 Jan 2002 13:39:55 +0100, "Thorsten Froehlich" <tho### [at] trfde>
> This is parsed ok:
>
> #macro P(F) #end
> #local F=function{x}
>
> and this not:
>
> #local F=function{x}
> #macro P(F) #end
>
> The only difference is the order of lines.
>
> ABX


Post a reply to this message

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