POV-Ray : Newsgroups : povray.general : Problem with Parse_String and #ifndef Server Time
4 Aug 2024 04:12:39 EDT (-0400)
  Problem with Parse_String and #ifndef (Message 11 to 15 of 15)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Warp
Subject: Re: Problem with Parse_String and #ifndef
Date: 10 Sep 2003 17:23:50
Message: <3f5f9666@news.povray.org>
Jim Charter <jrc### [at] msncom> wrote:
> >   In C++ yes, but the POV-Ray SDL is a hacker language. :P
> > 
> Do you mean a language for 'hacks', or a language for 'hackers'?

  Mainly I meant a language for hackers. You know, that type of language
which you can use to make marvelous things with an incredibly short piece
of code... which is also so obfuscated you don't understand it at all... :P

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

From: Tim Nikias v2 0
Subject: Re: Problem with Parse_String and #ifndef
Date: 10 Sep 2003 18:02:15
Message: <3f5f9f67$1@news.povray.org>
> Thanks Tim!
>
> Greetings,
> Florian

You're welcome. I figured this one pretty
fast because I had similiar ideas about dynamic
texture/array/object generation some months
ago, and gave thought to those issues at
that time. And seeing your code, it was
rather simple to just write my initial thoughts
about it... :-)

-- 
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: no_lights (@) digitaltwilight.de


> Hi Tim!
>
> > You've got to experiment. Perhaps writing the entire
> > #ifndef () ... #debug ".." #end
> > to disc and #including that.
> That did the job!
>
> if anyone is interested, here's the code:
>
> <code>
> #include "strings.inc"
>
> #declare TestIdent = 1;
>
> #macro IFDEF2(Name)
> #declare TEMPDEF__ = 0;
>
> Parse_String(concat(
> "#ifdef(",Name,")
> #declare TEMPDEF__=1;
> #end"
> ))
>
> (TEMPDEF__)
> #end
>
> #if (IFDEF2("TestIdent"))
> #debug "defined\n"
> #else
> #debug "nope\n"
> #end
> </code>
>
> result: defined
>
> Thanks Tim!
>
> Greetings,
> Florian
> -- 
> //=================[web: http://www.torfbold.com]==================\\
> #local a=-5;#while(a<5)sphere{<sin(a*pi)*5a*10pow(a,5)*.01>sin(a*a*a*
> .1)+1pigment{rgb 9*z}}#local a=a+.01;#end camera{look_at-y*10location
> <8,-3,-8>*10}// [www.povray.org]     [www.imp.org]     [www.irtc.org]
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 01.09.2003


Post a reply to this message

From: Christopher James Huff
Subject: Re: Problem with Parse_String and #ifndef
Date: 10 Sep 2003 21:35:38
Message: <cjameshuff-987A4F.21354710092003@netplex.aussie.org>
In article <3f5f6476@news.povray.org>,
 "Thorsten Froehlich" <tho### [at] trfde> wrote:

> In article <3f5f6336@news.povray.org> , Warp <war### [at] tagpovrayorg>  wrote:
> 
> > #de#parse("cl")are ab#parse("cde")fg = 5;
> 
> Aren't *you* the one who usually argues for well structured code? ;-) ;-)

Aren't you forgetting who started the scrambled signature craze?

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Ken
Subject: Re: Problem with Parse_String and #ifndef
Date: 10 Sep 2003 21:46:01
Message: <3F5FD3A4.FCFB328A@pacbell.net>
Christopher James Huff wrote:
> 
> In article <3f5f6476@news.povray.org>,
>  "Thorsten Froehlich" <tho### [at] trfde> wrote:
> 
> > In article <3f5f6336@news.povray.org> , Warp <war### [at] tagpovrayorg>  wrote:
> >
> > > #de#parse("cl")are ab#parse("cde")fg = 5;
> >
> > Aren't *you* the one who usually argues for well structured code? ;-) ;-)
> 
> Aren't you forgetting who started the scrambled signature craze?

I haven't (in case he conveniently forgets) and would be more than
happy to name names.

-- 
Ken Tyler


Post a reply to this message

From: Warp
Subject: Re: Problem with Parse_String and #ifndef
Date: 11 Sep 2003 08:10:50
Message: <3f60664a@news.povray.org>
Ken <tyl### [at] pacbellnet> wrote:
> > Aren't you forgetting who started the scrambled signature craze?

> I haven't (in case he conveniently forgets) and would be more than
> happy to name names.

  But I'm proud of that. :)

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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