 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <slr### [at] teal h hjp at>,
hjp### [at] SiKitu wsr ac at (Peter J. Holzer) wrote:
> I would prefer if no keyword was necessary at all, just
>
> # a = a + 5
>
> I think this should be possible with minor changes in the parser, since
> keywords cannot be used as variable names anyway.
That might be quite possible...but you should always use upper case to
avoid name conflicts, since new keywords are always lower case. :-)
It also looks like it might be easy to allow semicolons after every
assignment, something that I wish POV already did.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Thorsten Froehlich
Subject: Re: #let keyword(was: Previews of Ice Planet...)
Date: 3 Sep 2000 21:35:44
Message: <39b2fc70$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
In article <slr### [at] teal h hjp at> ,
hjp### [at] SiKitu wsr ac at (Peter J. Holzer) wrote:
> I would prefer if no keyword was necessary at all, just
>
> # 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.
Thorsten
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <39b2fc70$1@news.povray.org>, "Thorsten Froehlich"
<tho### [at] trf de> 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] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Tony[B]
Subject: Re: #let keyword(was: Previews of Ice Planet...)
Date: 3 Sep 2000 22:21:30
Message: <39b3072a@news.povray.org>
|
|
 |
|  |
|  |
|
 |
There are programming languages like this out there? <shudder>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <chrishuff-9358DC.21074603092000@news.povray.org>, Chris
Huff <chr### [at] mac com> wrote:
> I think it would be possible by...
Well, it isn't that easy. :-(
I will take a closer look, but I don't really understand much of the
parser code.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Tony[B]" wrote:
>
> There are programming languages like this out there? <shudder>
The example he gave is not very different than what we had in
POV-Ray v1.0.
--
Ken Tyler - 1400+ POV-Ray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chris Huff wrote:
>
> It also looks like it might be easy to allow semicolons after every
> assignment, something that I wish POV already did.
Some MS-DOS versions of the POV-Ray 3.1 betas used to do that. Dunno
why it has been removed.
Fabien.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Peter J. Holzer <hjp### [at] sikitu wsr ac at> wrote:
: # a = a + 5
A semi-colon at the end would be nicer.
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Philippe Debar
Subject: Re: #let keyword(was: Previews of Ice Planet...)
Date: 4 Sep 2000 06:41:06
Message: <39b37c42@news.povray.org>
|
|
 |
|  |
|  |
|
 |
I like the keyword (and the concept). It is short and clear in its meaning
(imho).
Povingly,
Philippe
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Nicolas Calimet
Subject: Re: #let keyword(was: Previews of Ice Planet...)
Date: 4 Sep 2000 10:33:56
Message: <39B3B53A.38EEA979@free.fr>
|
|
 |
|  |
|  |
|
 |
What about #eval if not used elsewhere ?
(okay, one letter longer)
*** Nicolas Calimet
*** http://pov4grasp.free.fr
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |