|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I want to use macros in a way that they probably can't be used. I only ask
because every time I don't, it turns out that what I want to do is quite
easy and everyone but me has been doing it all along...
I want to call the macro with only those values that are relevant to it's
present use. For instance...
gadget(knobs)
gadget(knobs,lights,dials)
gadget(dials,dial_light,dial_needle,dial_range)
... where everything not specified is assumed. This is because I want to
make some macros with a couple dozen possible fields and I don't want to
have to list every one of them every time.
TIA
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 10 Feb 2000 08:20:31 -0500, Bill DeWitt wrote:
>I want to use macros in a way that they probably can't be used. I only ask
>because every time I don't, it turns out that what I want to do is quite
>easy and everyone but me has been doing it all along...
>
>I want to call the macro with only those values that are relevant to it's
>present use. For instance...
While this has been discussed in the past, it's never been implemented,
so you're safe from ridicule: it can't (yet) be done.
--
These are my opinions. I do NOT speak for the POV-Team.
The superpatch: http://www2.fwi.com/~parkerr/superpatch/
My other stuff: http://www2.fwi.com/~parkerr/traces.html
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Ron Parker" <ron### [at] povrayorg> wrote :
>
> so you're safe from ridicule:
>
Well, at least about this....
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Overloading functions (macros) is currently not possible. Maybe something to
implement in 3.5?
----------------------------------------------------
Mikael Carneholm
Dep. of Computer Science and Business Administration
Personal homage:
http://www.studenter.hb.se/~arch
E-mail:
sa9### [at] idautbhbse
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Bill DeWitt" <the### [at] earthlinknet> wrote in message
news:38a2bb1e@news.povray.org...
> I want to call the macro with only those values that are relevant to it's
> present use. For instance...
>
> gadget(knobs)
> gadget(knobs,lights,dials)
> gadget(dials,dial_light,dial_needle,dial_range)
>
> ... where everything not specified is assumed. This is because I want
to
> make some macros with a couple dozen possible fields and I don't want to
> have to list every one of them every time.
>
> TIA
A workaround: *.inc files
with scripts like
#ifndef(gadgetKnobs) #declare gadgetKnobs=126; #end
at the beginning.
If there are really many settings, use *.inc files for storing settings
=>
#include "gadgetDefaultSettings 01.inc"
#declare gadgetKnob=1493;
#include "gadget.inc"
Hope this helps
Philippe
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Bill DeWitt wrote:
> I want to call the macro with only those values that are relevant to
> it's
> present use.
just like philippe still mentioned:use the ifndef-function. i think it
could be done without an *.inc-file like this:
// here you can declare only the params you need:
#declare par1=35;
#declare par2=3.7;
#declare par3=383;
// before calling the macro, all undefined params are checked and
// set to a default value:
#ifndef (par1) #declare par1=1.0; #end
#ifndef (par2) #declare par1=0.0; #end
#ifndef (par3) #declare par1=2.5; #end
.
.
// now, with all params declared, you can call your macro:
gadget (par1,par2,par3,...)
alex
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Bill DeWitt wrote in message <38a2c0b9@news.povray.org>...
>
>"Ron Parker" <ron### [at] povrayorg> wrote :
>>
>> so you're safe from ridicule:
>>
>
> Well, at least about this....
>
>
povray.general.dewitt.lol
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <38A2CE02.5145A6B7@ida.utb.hb.se>, sa9### [at] idautbhbse
wrote:
> Overloading functions (macros) is currently not possible. Maybe
> something to implement in 3.5?
This sounds more like default values for parameters than
overloading--although overloading might also be nice, I don't think it
would be possible without changing the syntax for variables(which might
not be such a bad idea).
--
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Bill DeWitt wrote:
> "Ron Parker" <ron### [at] povrayorg> wrote :
> >
> > so you're safe from ridicule:
> >
>
> Well, at least about this....
Bill DimWitt. (couldn't resist) :-)
--
___ ______________________________________________________
| \ |_ <dav### [at] faricynet> <ICQ 55354965>
|_/avid |ontaine http://www.faricy.net/~davidf/
"Sitting on a cornflake, waiting for the van to come" -Beatles
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 10 Feb 2000 16:53:20 -0600, David Fontaine wrote:
>Bill DeWitt wrote:
>> Well, at least about this....
>
>Bill DimWitt. (couldn't resist) :-)
I've managed to resist all these years. Surely you could have. :)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |