|
|
Thorsten Froehlich wrote:
>
> This isn't legal syntax and POV-Ray cannot currently detect this properly.
Isn't there a possibility to prevent the crash?
> To do what you want, use #declare instead of #local like this:
>
> #macro F_Plane ()
> #undef fn_p
> #declare fn_p=function (x,y,z) { y };
> fn_p
> #end
Note this is an undocumented feature. In fact function declarations are
not listed in the #declare documentation at all:
DECLARATION:
#declare IDENTIFIER = RVALUE |
#local IDENTIFIER = RVALUE
RVALUE:
FLOAT; | VECTOR; | COLOR; | STRING | OBJECT | TEXTURE |
PIGMENT | NORMAL | FINISH | INTERIOR | MEDIA | DENSITY |
COLOR_MAP | PIGMENT_MAP | SLOPE_MAP | NORMAL_MAP |
DENSITY_MAP | CAMERA | LIGHT_SOURCE | FOG | RAINBOW |
SKY_SPHERE | TRANSFORM
Function documentation only lists the full declarations:
FUNCTION_IDENTIFIER:
#local FUNCTION_IDENTIFIER = function { FLOAT } |
#declare FUNCTION_IDENTIFIER = function { FLOAT } |
#local FUNCTION_IDENTIFIER = function(IDENT_LIST) { FLOAT } |
#declare FUNCTION_IDENTIFIER = function(IDENT_LIST) { FLOAT } |
#local FUNCTION_IDENTIFIER = function{SPECIAL_FLOAT_FUNCTION} |
#local VECTOR_IDENTIFIER = function{SPECIAL_VECTOR_FUNCTION} |
#local COLOR_IDENTIFIER = function { SPECIAL_COLOR_FUNCTION } |
Calls to user defined functions are missing in the 'Float Expressions'
as well.
Christoph
--
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 25 Oct. 2003 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
|