POV-Ray : Newsgroups : povray.unofficial.patches : Retaining persistent variables in MegaPov 1.0 Server Time
4 Jul 2024 20:37:36 EDT (-0400)
  Retaining persistent variables in MegaPov 1.0 (Message 21 to 23 of 23)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Christoph Hormann
Subject: Re: Retaining persistent variables in MegaPov 1.0
Date: 10 Oct 2003 15:52:02
Message: <onej51-heh.ln1@triton.schunter.etc.tu-bs.de>
Peter Popov wrote:
> 
> Yeah but you're the one who proposes this horrendous syntax. Man, I
> had to turn on the spell checker to make sure I wasn't making a fool
> of myself... I guess it's as well that you didn't propose some
> 46-character German word for it :-)


i 
characters are also so nicely improving portability of script files...)

Of course we can also make it:

#merk_dir_das_und_vergiss_es_nicht_gleich_wieder

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 2 Sep. 2003 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: David Wallace
Subject: Re: Retaining persistent variables in MegaPov 1.0
Date: 15 Oct 2003 14:50:48
Message: <3f8d9708@news.povray.org>
In C/C++ persistent external variables are declared as static.  Since static
is not a reserved word in POV (I checked) that should be the name of a
variable that persists from frame to frame in an animation:

#static Fwd = 203.4;

"Christoph Hormann" <chr### [at] gmxde> wrote in message
news:jtv### [at] tritonschunteretctu-bsde...
> sups wrote:
> > Hi ABX!
> >
> > Thank you for both your replies. From your previous reply it was clear
that
> > persistent variables may not have made it to MP1.0. But in the manuals
of
> > MP1.0, nowhere it has been explicitly mentioned. Therefore I had the
> > slightest hope that this feature may be accesible in some other way. It
> > would be really nice to get this feature back since my code is not
> > compatible with MP0.7.
>
> It is not very likely that this will happen any time soon.  The
> persistence of variables patch was somewhat ugly and Nathan was probably
> the only one who really understood it.
>
> I would also prefer a different syntax for such a patch.  Like for
> example a new #persistent directive which works like #declare and #local
> but stores the data differently so it is not cleared after each frame.
>
> Christoph
>
> -- 
> POV-Ray tutorials, include files, Sim-POV,
> HCR-Edit and more: http://www.tu-bs.de/~y0013390/
> Last updated 2 Sep. 2003 _____./\/^>_*_<^\/\.______
>


Post a reply to this message

From: Christopher James Huff
Subject: Re: Retaining persistent variables in MegaPov 1.0
Date: 15 Oct 2003 15:39:10
Message: <cjameshuff-AF6B4D.15365315102003@netplex.aussie.org>
In article <3f8d9708@news.povray.org>,
 "David Wallace" <dar### [at] earthlinknet> wrote:

> In C/C++ persistent external variables are declared as static.  Since static
> is not a reserved word in POV (I checked) that should be the name of a
> variable that persists from frame to frame in an animation:
> 
> #static Fwd = 203.4;

I think the static keyword is one of the worst misfeatures of C/C++. 
Retained, indestructible, invariable, permanent, safe...I think 
"persistent" is really the best word for this.

How about this: deprecate #declare, and have #global declare a global 
persistent variable. Use #local to declare local variables, and #set to 
modify existing variables. Most variables should be local anyway, except 
for those in includes. This fixes several problems with the existing 
system. If non-persistent global variables turn out to be useful often 
enough, add something like #transient or #temporary to avoid the need to 
undefine them. (I don't think this will be necessary.)

-- 
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

<<< Previous 10 Messages Goto Initial 10 Messages

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