POV-Ray : Newsgroups : povray.general : Macro with variable number of parameters... : Re: Macro with variable number of parameters... Server Time
29 Jul 2024 12:29:57 EDT (-0400)
  Re: Macro with variable number of parameters...  
From: Matthias
Date: 21 Jun 1999 11:21:08
Message: <376e5864@news.povray.org>
Ron Parker <par### [at] fwicom> schrieb in im Newsbeitrag:
376dcac4.120103227@news.povray.org...
> On 19 Jun 1999 11:15:34 -0400, Nieminen Mika <war### [at] cctutfi> wrote:
>
> >In povray.general con### [at] geocitiescom wrote:
> >: myMacro(0,"a")
> >
> >: or
> >
> >: myMacro(1,"a","b")
> >
> >#macro myMacro(itemsAmount, stringArray)
> >  ...
> >#end
>
> Or just pass the array and use dimension_size.
>


elements used in it (which makes the same as just typing an unused
parameter.
My idea is to use a macro with two Parameters. the first is a usual float.
the second could be a float or a vector; like this
#macro(bool,data)
    #if bool
        #declare u.data = a;
        #declare v.data =b;
    #else
        #declare data = a;
    #end
#end

this of course assumes that the user enters the maco correctly (using only
two parameters if bool = 1 )

hope Icould help you
maesju **


Post a reply to this message

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