POV-Ray : Newsgroups : povray.beta-test : namespace issue : Re: namespace issue Server Time
29 Jul 2024 10:22:42 EDT (-0400)
  Re: namespace issue  
From: Thorsten Froehlich
Date: 27 May 2002 07:49:05
Message: <3cf21d31@news.povray.org>

Skiba <abx### [at] babilonorg>  wrote:

> #local C=0;
> #local inc=function(C){C+1};
>
> Is this supposed to work or not ? It not works with becouse of error message
> "'parameter identifier' expected". I looked in chapters about functions for
> 'parameter identifier' but can't find any appropriate note so expect it has
> similiar behavior to macro parameters.

Well, "C" is a parse time constant so it will of course as one would expect be
substituted for its value:

    #local inc=function(0){0+1};

The is exactly the same way as it works for every other scene (time) object.
Remember that functions are *not* macros but just another 'object' type!

    Thorsten

____________________________________________________
Thorsten Froehlich
e-mail: mac### [at] povrayorg

I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

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