|
|
Am 06.07.2014 16:25, schrieb deep125:
>
> isosurface {
> function{
> val("1.5")
> // 5
>
> }
> contained_by { box { -2, 2 } }
> }
>
>
> error:
> line 3: Parse Error: Expected 'operand', string literal found instead
> Way?
Some statements are not available inside user-defined functions, because
they typically don't make much sense there, or would have been
unnecessarily difficult to implement; after all, these functions must be
"compiled" into a bytecode and then executed by some virtual machine at
run-time. A virtual machine which had to be specifically implemented for
this task, as there was no such thing as LLVM back in those dark ages.
(I wouldn't be too surprised if it even predates the Java VM.)
In your case, you can easily work around this limitation by using:
isosurface {
#declare V = val("1.5");
function { V }
...
}
Post a reply to this message
|
|