POV-Ray : Newsgroups : povray.advanced-users : dot-notation not allowed in functions? : Re: dot-notation not allowed in functions? Server Time
19 Apr 2024 01:39:58 EDT (-0400)
  Re: dot-notation not allowed in functions?  
From: Kenneth
Date: 31 Jul 2018 02:55:01
Message: <web.5b600737497a6101a47873e10@news.povray.org>
"Thorsten Froehlich" <nomail@nomail> wrote:

>
> There is nothing to "fix" because this is not a bug. The function parser works
> exactly as designed and documented.
>
> The documentation is very clear about what is allowed in functions:
> http://www.povray.org/documentation/view/3.6.1/231/
>

Oh, come on now, that's an OLD and crusty way to answer a question in the
newsgroups-- basically "RTFM", the all-encompassing fallback position-- which I
thought had been 'deprecated' by now :-P

My question was, "What is the *reason* for the [dot-notation] limitation"--
since dot-notation works in every other situation I've tried it in, to the
extent that I thought of it as a fundamental 'tool' in POV-Ray...like #declare,
for example. Clipka's answer was... reasonable. Whereas RTFM is
rather...devoid...of useful information.

But you're correct-- the documentation does not state that dot-notation works in
user-defined functions. (I truly wish I had a complete and total knowledge of
the entire contents of the documentation, along with instant recall of the
details; then I wouldn't need to ask any questions!)

> Obviously, the documentation describes only the finite set of allowed syntax
> elements, not the infinite set of not allowed syntax elements.
>

Well, it *does* mention one of the infinite set of not-allowed syntax elements:

"Note: Only the above mentioned items can be used in user-defined functions. For
example the rand() function is not available."

That last tidbit of information has always been extremely useful; but how or why
did rand() make it into the 'exceptions'?? My guess is that users kept asking
the same question over and over: "Why doesn't rand() work in functions?"

;-)


Post a reply to this message

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