POV-Ray : Newsgroups : povray.beta-test : number of parameters in functions : Re: number of parameters in functions Server Time
4 Nov 2024 13:42:26 EST (-0500)
  Re: number of parameters in functions  
From:
Date: 20 Sep 2001 03:35:48
Message: <7g5jqtsieacpeffsaugnb6rkgforkgi7qs@4ax.com>
On Wed, 19 Sep 2001 11:39:21 -0400, "Thorsten Froehlich"
<tho### [at] trfde> wrote:

> In article <kc3hqtkgj93f82rpkj6puvlj8f5cs7nk0q@4ax.com> , Wlodzimierz ABX 
> Skiba <abx### [at] babilonorg>  wrote:
>
> >   #declare func=function{1+2+3}
> >   #local New=function{func()}
> >
> > it stoped with note that operand expected (what is nonsense for me)
>
> Well, it would help if at this point you would have RTFM:
> The first one declared a function with _three_ parameters, the later tries
> to pass _zero_ parameters.  It make ***not*** sense to have a function with
> _zero_ parameters and thus it is not allowed.

Yes, I'm a programer and I understand that zero parameters is nonsesne
and should be replaced with simple expresion withoud function{} shell
but I can imagine some beginners in POV without any programing
knowledge who can tread functions as only set of letter and they can
write such thing and wonder why he should add (x,y,z) if it is not
used inside and is constant.
It is just suggestion to add warning when inside function is only
float expression. Warning could contain note that user rather should
replace function{} with only float and/or should remeber that it is
function with 3 parameters. I think that it could even use sentence
from documentation: "The minimum number of parameters is 1."
Note this says about function and not point to () neither {}.
I hope my english was enough.

> You are right that it should not crash, I will look into it.

Thanks

ABX


Post a reply to this message

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