POV-Ray : Newsgroups : povray.unofficial.patches : #let keyword(was: Previews of Ice Planet...) Server Time
2 Sep 2024 06:20:21 EDT (-0400)
  #let keyword(was: Previews of Ice Planet...) (Message 16 to 25 of 35)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Chris Huff
Subject: Re: #let keyword(was: Previews of Ice Planet...)
Date: 3 Sep 2000 20:52:04
Message: <chrishuff-F17AC1.19534403092000@news.povray.org>
In article <slr### [at] tealhhjpat>, 
hjp### [at] SiKituwsracat (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] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, 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] tealhhjpat> , 
hjp### [at] SiKituwsracat (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

From: Chris Huff
Subject: Re: #let keyword(was: Previews of Ice Planet...)
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

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

From: Chris Huff
Subject: Re: #let keyword(was: Previews of Ice Planet...)
Date: 3 Sep 2000 22:59:48
Message: <chrishuff-0F96DD.22012703092000@news.povray.org>
In article <chrishuff-9358DC.21074603092000@news.povray.org>, Chris 
Huff <chr### [at] maccom> 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] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Ken
Subject: Re: #let keyword(was: Previews of Ice Planet...)
Date: 4 Sep 2000 00:18:14
Message: <39B1FEFE.BF7675DE@pacbell.net>
"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

From: Fabien Mosen
Subject: Re: #let keyword(was: Previews of Ice Planet...)
Date: 4 Sep 2000 02:28:42
Message: <39B3400C.F5C3D553@skynet.be>
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

From: Warp
Subject: Re: #let keywor
Date: 4 Sep 2000 06:26:36
Message: <39b378dc$1@news.povray.org>
Peter J. Holzer <hjp### [at] sikituwsracat> 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

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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