POV-Ray : Newsgroups : povray.general : Problem with Parse_String and #ifndef : Re: Problem with Parse_String and #ifndef Server Time
4 Nov 2024 21:23:06 EST (-0500)
  Re: Problem with Parse_String and #ifndef  
From: ABX
Date: 10 Sep 2003 12:34:19
Message: <c5kulvsca8m0ppns155dbjjp8d4rocqsp1@4ax.com>
On Wed, 10 Sep 2003 18:22:47 +0200, Florian Brucker <tor### [at] torfboldcom> wrote:
> <code>
> #include "strings.inc"
>
> #local Number = 34;
> #local PigmentName = concat("Pigment",str(Number,0,0));
>
> #ifndef(Parse_String(PigmentName))
> 	#debug "no pigment defined, yet\n"
> #end
> </code>

Try this:

#include "strings.inc"
#local Number = 34;
#local PigmentName = concat("Pigment",str(Number,0,0));
#local PigmentTest = concat("(defined(",PigmentName,")?yes:no)");
#if(!Parse_String(PigmentTest))
	#debug "no pigment defined, yet\n"
#end

ABX


Post a reply to this message

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