POV-Ray : Newsgroups : povray.beta-test : Function parameter bug : Re: Function parameter bug Server Time
30 Jul 2024 14:29:44 EDT (-0400)
  Re: Function parameter bug  
From: JRG
Date: 27 Oct 2001 04:48:55
Message: <3bda74f7@news.povray.org>
Ah aaah.... now I understand...
You want to give your float identifiers any name you want without bothering
that that name is already used somewhere (for example in math.inc) as a
function parameter. But why bother? Just use another identifier. Of course I
usually expect an uppercased identifier (such as R) to work in any
situation, but this could be just a minor problem in math.inc design.

--
Jonathan.

"Rune" <run### [at] mobilixnetdk> ha scritto nel messaggio
news: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.