POV-Ray : Newsgroups : povray.general : Few tricks : Re: Few tricks Server Time
10 Dec 2024 19:32:32 EST (-0500)
  Re: Few tricks  
From: jr
Date: 26 Nov 2023 05:10:00
Message: <web.6563188bc0e3ff73f11225116cde94f1@news.povray.org>
hi,

kurtz le pirate <kur### [at] gmailcom> wrote:
> In my current project, ...
> *** Tips 2 : Multiple return values from macro directly assigned to
> variables ***
>
> #declare MyMacro(p1, p2, p3, p4)
>   ..
>   ..
>   array { Return1, Return2, Return3}
> #end
>
>
> Used in this way :
> #declare { V1, V2, V3 } = MyMacro (a, b, c, d);
>
> I hope this helps.
> Critical comments welcome !

puzzled rather than critical :-)  why an array ?  eg

#macro myMacro(p1,p2,p3,p4)
  ...
  (ret1, ret2, ret3)
#end

#declare (v,v2,v3) = myMacro(a,b,c,d);


too works.


regards, jr.


Post a reply to this message

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