POV-Ray : Newsgroups : povray.beta-test : spline & macro : Re: spline & macro Server Time
31 Jul 2024 04:17:58 EDT (-0400)
  Re: spline & macro  
From: Mark Wagner
Date: 11 Sep 2001 00:24:02
Message: <3b9d91e2@news.povray.org>
Mael wrote in message <3b9c87b0$1@news.povray.org>...
>
>sphere { 0,.1 translate mymacro(MySpline( <----ERROR
>Parse Error: Expected ')', ( found instead


This is because POV-Ray comes across the "MySpline", and thinks you are
passing the entire spline to the macro.  Then it finds the parenthesis, and
gets confused.

>however if i add parenthesis it works
>
>sphere { 0,.1 translate mymacro((MySpline(.5))) pigment {color rgb 1}}


This time, POV-Ray finds the parenthesis, and is expecting a number or
vector.  As a result, when it finds the "MySpline", it evaluates the spline
at 0.5, and passes the result to the macro.

Because of the way the POV-Ray parser works, I don't think this behavior can
easily be changed.

--
Mark


Post a reply to this message

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