POV-Ray : Newsgroups : povray.beta-test : Function parameter bug : Re: Function parameter bug Server Time
30 Jul 2024 14:28:18 EDT (-0400)
  Re: Function parameter bug  
From: Rune
Date: 26 Oct 2001 20:18:22
Message: <3bd9fd4e@news.povray.org>
"JRG" wrote:
> V does not represent your function, it's just a
> parameter. As it is now you are telling povray to do:
> #declare Myfunction (0.1) (0.1*2)

But shouldn't the parameters use a different name-space than things declared
outside of the functions, just like it works with macros?

This:

#declare V = 0.1;
#include "math.inc"

gives an error because a function in math.inc uses V as a parameter! We
can't have that, now can we?

> try something like this:
>
> #declare Myfunction = function (V) {V*2}
> sphere {x, Myfunction (0.1)}

No because that's not what I want. I want the function to leave alone my
declared floats and stop bothering them.

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated June 26)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

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