POV-Ray : Newsgroups : povray.advanced-users : Multiple #ifdef question : Re: Multiple #ifdef question Server Time
30 Jul 2024 04:18:05 EDT (-0400)
  Re: Multiple #ifdef question  
From: Philippe Debar
Date: 9 Mar 2000 04:14:40
Message: <38c76b80@news.povray.org>
"Nieminen Juha" <war### [at] sarakerttunencstutfi> wrote in message
news:38c6179a@news.povray.org...
>   I don't think it's possible with a macro. Something like this will not
work:
>
> #macro Item(name)
>   #ifdef(name)
>     do_whatever_with name
>   #end
> #end
>
> because 'name' _is_ always defined in the context of the macro.


Also, I think calling Item(Name) will cause an error if Name is undefined.
The only legal use of an undefined name I can think of are (1) define it
(with #declare or #local or #macro) and (2) check its "existence"
(definess?) with ifdef / ifndef.


Philippe


Post a reply to this message

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