POV-Ray : Newsgroups : povray.general : Undefine macro? : Re: Undefine macro? Server Time
7 Aug 2024 07:13:25 EDT (-0400)
  Re: Undefine macro?  
From: Ron Parker
Date: 7 Dec 2001 11:13:06
Message: <slrna11qkk.nq1.ron.parker@fwi.com>
On Fri, 7 Dec 2001 16:43:56 +0100, Rune wrote:
> "Ron Parker" wrote:
>> Can you just redefine it to do nothing?
> 
> No! I want to undefine it!
> 
> I use #ifdef to test whether or not the macro is defined, and of course it
> still returns true if I redefine the macro to do nothing.
> 
> You can define a macro and you can test whether or not it's defined, but you
> can't undefine it. I find that highly inconsistent! Is there any reasoning
> behind this design in POV-Ray?
> 
> If not, I hope that the ability to undefine a macro using #undef will be
> added to POV-Ray ASAP.

The ability to do so was mostly already there, but there was a bug that
prevented it from working.  When we saw the macro ID, we tried to invoke
the macro instead of just looking at its ID.  That bug will be fixed in
the next beta of 3.5.

-- 
plane{-z,-3normal{crackle scale.2#local a=5;#while(a)warp{repeat x flip x}rotate
z*60#local a=a-1;#end translate-9*x}pigment{rgb 1}}light_source{-9red 1rotate 60
*z}light_source{-9rgb y rotate-z*60}light_source{9-z*18rgb z}text{ttf"arial.ttf"
"RP".01,0translate-<.6,.4,.02>pigment{bozo}}light_source{-z*3rgb-.2}//Ron Parker


Post a reply to this message

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