|
|
"twister" <twi### [at] o2pl> wrote in message
news:web.49acf63adb4d2f97c9ee64130@news.povray.org...
>I have created such a #macro:
> ...
>
> So I can use it in this way:
> #declare new_spline = 0;
> createSpline(myArr, 5, new_spline)
> //here I have new_spline filled with spline object
>
> But my intention is to create a #macro that returns spline by value, not
> by
> parameter as above. I could then use my #macro in this way:
>
> #declare new_spline = createSpline(myArr, 5);
> //where myArr is an array with points defining a curve
>
If you look at Charles' example (following his sig), you'll see that this
is what it does. Essentially in your example, where you #declare name = sp;
you can simply specify sp (no quotes, brackets, semicolon etc.).
Alternatively you can just remove the '#local sp =' from in front of the
spline definition and the spline will be returned by the macro.
> Question 2: Is there any way (other than using #ifdef command) to check
> the size
> of an array?
>
dimension_size(arr,1)
Regards,
Chris B.
Post a reply to this message
|
|