POV-Ray : Newsgroups : povray.programming : Overloading identifiers : Re: Overloading identifiers Server Time
29 Jul 2024 00:30:23 EDT (-0400)
  Re: Overloading identifiers  
From: Nieminen Mika
Date: 28 Jan 1999 13:36:23
Message: <36b0ae27.0@news.povray.org>
Ron Parker <par### [at] my-dejanewscom> wrote:
: The most likely usage of this kind of
: macro overloading seems like it would be to default parameters, and it 
: seems like that would be better accomplished by directly allowing default 
: parameters.
(snip)
: #macro baz(foo, bar)
:   #ifndef (bar)
:     #declare bar=1;
:   #end
:   sphere {foo,bar}
: #end

  That's a very good point.
  I threw the idea on overloadable identifiers just as a suggestion but this
default parameter system is IMHO a very worthy of consideration.
  Perhaps it could go a little more further so that you could type:

#macro Test(a,b,c) ... #end
...

Test(1,2)
Test(1,,3)
Test(,2,3)

-- 
main(i){char*_="BdsyFBThhHFBThhHFRz]NFTITQF|DJIFHQhhF";while(i=
*_++)for(;i>1;printf("%s",i-70?i&1?"[]":" ":(i=0,"\n")),i/=2);} /*- Warp. -*/


Post a reply to this message

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