POV-Ray : Newsgroups : povray.newusers : loop in function : Re: loop in function Server Time
4 Sep 2024 20:15:37 EDT (-0400)
  Re: loop in function  
From: Adrien Rebollo
Date: 25 Aug 2002 18:44:14
Message: <3d695dbd@news.povray.org>
Warp wrote:

> Adrien Rebollo <adr### [at] gmxfr> wrote:
>> #declare my_function = function {
>>         sum (I, 0, Imax, my_array[I](x,y,z))
>> }
> 
>> gives me
>> Parse Error: Expected 'numeric expression', undeclared identifier 'I'
>> found instead
> 
>   Well, it's exactly what the error message says: I has not been defined
> anywhere, so POV-Ray can't know what do you mean by it.
>   You have to #declare its value.
> 

Then why does this work ?
#declare my_function = function {
        sum (I, 0, Imax, 2*I)
}

I have not #declared I either.


Post a reply to this message

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