POV-Ray : Newsgroups : povray.advanced-users : dot-notation not allowed in functions? : dot-notation not allowed in functions? Server Time
26 Apr 2024 11:55:50 EDT (-0400)
  dot-notation not allowed in functions?  
From: Kenneth
Date: 30 Jul 2018 08:55:00
Message: <web.5b5f0a2f5643a6eba47873e10@news.povray.org>
I just came across a strange limitation when trying to use variable-substitution
in a function:

#declare VAR = <2,.7,.6>;

#declare MY_FUNCTION = function(x,y,z,a,b,c) {...body of function...}

Then, attempting to use dot-notation for VAR, within the function...

isosurface{
     function{MY_FUNCTION(x,y,z,VAR.x,VAR.y,VAR.z)}
     ...
     }

But this causes a fatal error:
    "expected 'operand', vector function 'vector identifier' found instead"

I assumed that the dot-notation would work-- because the components of VAR are
all individual scalar quantities now.

I tried surrounding the individual VAR components with parentheses (to try and
'eliminate' their vector nature, similar to dot-operator use for colors when a
'non-color' value is needed) but that doesn't work either.

I'm curious to know the reason for this limitation.


Post a reply to this message

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