POV-Ray : Newsgroups : povray.general : A painful lesson regarding function arguments. u=x, v=y. : Re: A painful lesson regarding function arguments. u=3Dx, v=3Dy. Server Time21 May 2022 14:14:53 EDT (-0400)
 Re: A painful lesson regarding function arguments. u=3Dx, v=3Dy.
 From: Kenneth Date: 27 Sep 2021 17:35:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.6152384a3077206f4cef624e6e066e29%40news.povray.org",
"headline": "Re: A painful lesson regarding function arguments. u=3Dx, v=3Dy.",
"dateCreated": "2021-09-27T21:35:00+00:00",
"datePublished": "2021-09-27T21:35:00+00:00",
"author": {
"@type": "Person",
"name": "Kenneth"
}
}
William F Pokorny <ano### [at] anonymousorg> wrote:
> Though long a user of user functions, today I ran face first into a
> parameter naming trap which had me tangled up for hours. Though perhaps
> not too surprising in hindsight, thought I'd pass along the lesson learned.
>
> Fn0 = function (x,y,z) {...} // OK. Pass anything you want for x,y,z.
>
> Fn1 = function (v) {...} // OK. Pass anything you want for v.
>
> Fn2 = function (x,y,z,v) // Boom! What you pass for v overwrites y.
>
> Looks to be related to u and v being synonyms for x and y. Something like:
>
> Fn3 = function (x,y,z,_v) {...} // OK. Pass what you want.
>
> Bill P.

Interesting! Thanks for the breakdown. I think I ran into a similar problem at
some point in the past year, but didn't try to pursue it (due to sheer lack of
understanding) and moved on.
```