POV-Ray : Newsgroups : povray.unofficial.patches : #let keyword(was: Previews of Ice Planet...) : Re: #let keyword(was: Previews of Ice Planet...) Server Time
2 Sep 2024 06:17:35 EDT (-0400)
  Re: #let keyword(was: Previews of Ice Planet...)  
From: Chris Huff
Date: 3 Sep 2000 22:06:07
Message: <chrishuff-9358DC.21074603092000@news.povray.org>
In article <39b2fc70$1@news.povray.org>, "Thorsten Froehlich" 
<tho### [at] trfde> wrote:

> >     # a = a + 5
> 
> I have to admit, I kind of like this idea ... and it does not add a
> additional symbol to the scene language.

I think it would be possible by adding a boolean "Modify_Only" parameter 
to the Parse_Declare() function(to tell it whether to create a new 
variable or give an error if given an undefined symbol), and add a call 
to Parse_Declare() here, replacing the "UNGET EXIT" that is there now:

    OTHERWISE
       Parse_Declare(TRUE);
    END_CASE
  END_EXPECT

Most of the same code from the #set patch could be reused for this, for 
modifying the most local variable, just check the Modify_Only parameter 
instead of the token.
I just finished making these modifications, I haven't tested it yet 
though...it might blow up in my face.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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