|
|
|
|
|
|
| |
| |
|
|
From: Wlodzimierz ABX Skiba
Subject: Re: How to permit null objects?
Date: 7 Feb 2001 05:38:44
Message: <3a8125b4@news.povray.org>
|
|
|
| |
| |
|
|
Greg M. Johnson wrote in message <3A802B51.CC97C5D2@my-dejanews.com>...
> Again, with great respect to Peter H, it's quite likely I'll make something
> less user-friendly than his is, but it at least will be designed around *my*
> objectives . . .
you have great ideas
but instead of null objects can't you use #if defined() syntax ?
ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Greg M. Johnson <gre### [at] my-dejanewscom> wrote:
:> :> Use a macro.
:> : Thanks but no.
:> Why not?
: The problem is how do I keep this modular approach if I'm missing some
: objects in the file. Perhaps Art's suggestion of defining these fingers
: as sphere{0,0} is the best.
I really don't understand why this excludes using macros.
--
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp wrote:
:> I really don't understand why this excludes using macros.
I don't understand what a macro would help with in this situation.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
When I want use something like null object in macro parameters I use
array instead of variable:
#macro SomethingWithPossibleNullObject(Object)
#ifdef (Object[0])
// Work with it
#else
// No object
#end
#end
SomethingWithPossibleNullObject(array[1]) // Null object
SomethingWithPossibleNullObject(array[1] { sphere{<0, 0, 0>, 1 }) //
Work with sphere
Regards
Disnel
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |