|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I'm having a problem with the following scene under 3.5b5. The use of int is
generating an error. I'm sort of assuming I'm doing something stupid, since
if it was a bug I would be surprised if no one had come across it before
(hence the post here rather than beta). I'm getting the error: "Parse Error:
Expected 'function identifier', } found instead"
I'm downloading beta 6 to see if that fixes it, but if anyone can spot what
I'm doing wrong enquiring minds want to know. Here's the simplified
function:
#include "functions.inc"
#declare fn_X = function(x,y,z) {int(x) }
isosurface {
function { fn_X(x, y, z) }
contained_by { box { -1, 1 } }
accuracy 0.001
max_gradient 4
pigment{Yellow}
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
No luck with beta 6 too...
Are you sure you are allowed to use int() in functions?
The docs do not seem to forbid that...
--
Jonathan.
"Tom Melly" <tom### [at] tomandlucouk> ha scritto nel messaggio
news:3bcca6d0@news.povray.org...
> I'm having a problem with the following scene under 3.5b5. The use of int
is
> generating an error. I'm sort of assuming I'm doing something stupid,
since
> if it was a bug I would be surprised if no one had come across it before
> (hence the post here rather than beta). I'm getting the error: "Parse
Error:
> Expected 'function identifier', } found instead"
>
> I'm downloading beta 6 to see if that fixes it, but if anyone can spot
what
> I'm doing wrong enquiring minds want to know. Here's the simplified
> function:
>
> #include "functions.inc"
> #declare fn_X = function(x,y,z) {int(x) }
> isosurface {
> function { fn_X(x, y, z) }
> contained_by { box { -1, 1 } }
> accuracy 0.001
> max_gradient 4
> pigment{Yellow}
> }
>
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
JRG wrote in message <3bcca883@news.povray.org>...
>No luck with beta 6 too...
>Are you sure you are allowed to use int() in functions?
>The docs do not seem to forbid that...
>
Hmm, well it's a fairly basic number-function. I'll repost to beta. Might as
well get hung for mutton as for lamb...
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
According to 6.1.6 "User-Defined Functions" in the docs, you *are* allowed
to use int() in functions.
- Slime
[ http://www.slimeland.com/ ]
[ http://www.slimeland.com/images/ ]
"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3bccad01@news.povray.org...
> JRG wrote in message <3bcca883@news.povray.org>...
> >No luck with beta 6 too...
> >Are you sure you are allowed to use int() in functions?
> >The docs do not seem to forbid that...
> >
>
> Hmm, well it's a fairly basic number-function. I'll repost to beta. Might
as
> well get hung for mutton as for lamb...
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it Tom Melly who wrote:
>I'm having a problem with the following scene under 3.5b5. The use of int is
>generating an error. I'm sort of assuming I'm doing something stupid, since
>if it was a bug I would be surprised if no one had come across it before
>(hence the post here rather than beta). I'm getting the error: "Parse Error:
>Expected 'function identifier', } found instead"
>
>I'm downloading beta 6 to see if that fixes it, but if anyone can spot what
>I'm doing wrong enquiring minds want to know. Here's the simplified
>function:
>
>#include "functions.inc"
>#declare fn_X = function(x,y,z) {int(x) }
>isosurface {
> function { fn_X(x, y, z) }
> contained_by { box { -1, 1 } }
> accuracy 0.001
> max_gradient 4
> pigment{Yellow}
>}
When I asked about it on povray.beta-test back in 3.5beta2 the response
was:-
>> The docs, page 6.1.6, say int() and val() are permissible in a
>> function.
> This is a documentation error. Sorry for that, it will be
> corrected.
>
> Thorsten
But then later in the thread
> Hmm, do we really need the "int" behavior? Anyway, I will add it to
> functions.
>
> Thorsten
I guess it got forgotten. I'll post a reminder on beta-test. In the
meantime you'll have to use "floor()" or "ceil()" instead of "int()".
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|