POV-Ray : Newsgroups : povray.general : Empty value for variable : Re: Empty value for variable Server Time
20 Apr 2024 07:29:35 EDT (-0400)
  Re: Empty value for variable  
From: jr
Date: 4 Feb 2023 07:35:00
Message: <web.63de4ff35d560c7488a828ca6cde94f1@news.povray.org>
hi,

"yesbird" <nomail@nomail> wrote:
> Your answer assumes that macros can accept variable number of arguments, but
> docs states following:

it does, sort of.  eg

#macro foo(a, optional b)
  #if (!defined(local.b))
    /* no b given on call */
  #end
  ...
#end

foo(1,2)

or

foo(1,)


presuming that a "misisng" when called can be used for your purpose.

(have a look at the 'queues.inc' for use of optional args)


regards, jr.


Post a reply to this message

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