POV-Ray : Newsgroups : povray.unofficial.patches : #let keyword(was: Previews of Ice Planet...) Server Time
2 Sep 2024 08:15:06 EDT (-0400)
  #let keyword(was: Previews of Ice Planet...) (Message 6 to 15 of 35)  
<<< Previous 5 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Chris Huff
Subject: Re: #let keyword(was: Previews of Ice Planet...)
Date: 31 Aug 2000 17:54:36
Message: <chrishuff-D4F6A6.16561131082000@news.povray.org>
In article <39aeca8b@news.povray.org>, "Tony[B]" 
<ben### [at] panamac-comnet> wrote:

> I don't like the keyword, but the concept is alright! :)

Which keyword? #let, or #set?
The post you replied to shouldn't even exist, since I told my software 
to cancel it, and claimed to have done so, then I reposted with #set in 
the subject...and can't find that post. It seems to have gone to data 
heaven...stupid program.

The real keyword is #set...I think "let" is a BASIC keyword for creating 
variables, which is why I didn't use it. The keyword I chose, "set", 
describes what the keyword does, and is nice and short compared to 
#local and #declare(which helps to make it stand out visually).

#modify? My second choice, but already used in another patch, I think. 
It has a similar length to #local and #declare, which could make it more 
easily mistaken for them, but is the most precise of the keywords I came 
up with.

#assign? It is less precise than #modify, and it is the same length.

#let? See my explanation above, used in BASIC to create a variable, 
which is what the #declare and #local keywords already do. It is also a 
bit more vague, but it is nice and short.

#make? #change? #mutate? Too imprecise, obtuse, vague, and/or sometimes 
used for other, entirely different things on computers.

Any better suggestions?

-- 
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: Tom Melly
Subject: Re: #let keyword(was: Previews of Ice Planet...)
Date: 1 Sep 2000 04:12:03
Message: <39af64d3@news.povray.org>
"Chris Huff" <chr### [at] maccom> wrote in message
news:chrishuff-D4F6A6.16561131082000@news.povray.org...


> ....
> Any better suggestions?
>

#update ? (bit long)


Post a reply to this message

From: Chris Huff
Subject: Re: #let keyword(was: Previews of Ice Planet...)
Date: 1 Sep 2000 13:03:15
Message: <chrishuff-9498EE.12045201092000@news.povray.org>
In article <39af64d3@news.povray.org>, "Tom Melly" <tom### [at] tomandlucouk> 
wrote:

> #update ? (bit long)

No offense, but yuck. :-)
It just doesn't seem to describe it well enough...and just doesn't seem 
to sound right for this feature.
I think the best keyword would be #modify, but it is already used, and 
the two uses may not interact well with each other.

-- 
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: Psychomek
Subject: Re: #let keyword(was: Previews of Ice Planet...)
Date: 2 Sep 2000 00:10:56
Message: <39B07FAC.5A6EB39@home.com>
what about #mod or #fix?

Chris Huff wrote:

> In article <39af64d3@news.povray.org>, "Tom Melly" <tom### [at] tomandlucouk>
> wrote:
>
> > #update ? (bit long)
>
> No offense, but yuck. :-)
> It just doesn't seem to describe it well enough...and just doesn't seem
> to sound right for this feature.
> I think the best keyword would be #modify, but it is already used, and
> the two uses may not interact well with each other.
>
> --
> 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: Chris Huff
Subject: Re: #let keyword(was: Previews of Ice Planet...)
Date: 2 Sep 2000 07:31:17
Message: <chrishuff-19B162.06325502092000@news.povray.org>
In article <39B### [at] homecom>, Psychomek <psy### [at] homecom> 
wrote:

> what about #mod or #fix?

The keyword "mod" is a function(mod(), for modulus), and even I don't 
understand #fix, so it would probably be far worse for a new user.

-- 
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: Psychomek
Subject: Re: #let keyword(was: Previews of Ice Planet...)
Date: 2 Sep 2000 09:52:07
Message: <39B107E7.976DB08E@home.com>
u might be right i stand corrected.....

Chris Huff wrote:

> In article <39B### [at] homecom>, Psychomek <psy### [at] homecom>
> wrote:
>
> > what about #mod or #fix?
>
> The keyword "mod" is a function(mod(), for modulus), and even I don't
> understand #fix, so it would probably be far worse for a new user.
>
> --
> 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: Warp
Subject: Re: #let keywor
Date: 3 Sep 2000 14:22:37
Message: <39b296ec@news.povray.org>
Chris Huff <chr### [at] maccom> wrote:
: I think the best keyword would be #modify, but it is already used

  Is it? What does it do? A megapov feature, I suppose?

-- 
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: Chris Huff
Subject: Re: #let keywor
Date: 3 Sep 2000 14:28:33
Message: <chrishuff-767435.13301303092000@news.povray.org>
In article <39b296ec@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

>   Is it? What does it do? A megapov feature, I suppose?

Something to do with persistent objects, I think. The syntax is a bit 
strange...

-- 
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: Peter J  Holzer
Subject: Re: #let keyword(was: Previews of Ice Planet...)
Date: 3 Sep 2000 20:00:45
Message: <slrn8r5jct.hvs.hjp-usenet@teal.h.hjp.at>
On Thu, 31 Aug 2000 16:56:11 -0500, Chris Huff wrote:
>The real keyword is #set...I think "let" is a BASIC keyword for creating 
>variables, which is why I didn't use it. The keyword I chose, "set", 
>describes what the keyword does, and is nice and short compared to 
>#local and #declare(which helps to make it stand out visually).

When I learned BASIC (1983), you didn't have to create any variables,
they were created automatically on first use. "let" simply started an
assignment statement, but it was optional, so you could either write

    10 LET A = SQR(2)

or 

    10 A = SQR(2)

Arrays would be dimensioned with DIM, so could write

    10 DIM A$(30)

to create an Array of 31 Strings. If you didn't use DIM, the array
would be created with 11 elements at first use. Some dialects allowed
you to resize arrays at runtime. 

I think later dialects also used DIM to define structures and other
complex data types, but at that time I was already off to other
programming languages.

[alternatives snipped]

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.

If not, I think #set is best, followed by #let (for old times' sake :-)
The alternatives are too long and not any clearer than these.

	hp

-- 
   _  | Peter J. Holzer    | Nicht an Tueren mangelt es,
|_|_) | Sysadmin WSR       | sondern an der Einrichtung (aka Content).
| |   | hjp### [at] wsracat      |    -- Ale### [at] univieacat
__/   | http://www.hjp.at/ |       zum Thema Portale in at.linux


Post a reply to this message

From: Peter J  Holzer
Subject: Re: #let keyword(was: Previews of Ice Planet...)
Date: 3 Sep 2000 20:00:46
Message: <slrn8r5mg4.hvs.hjp-usenet@teal.h.hjp.at>
On Fri, 01 Sep 2000 00:24:51 -0400, J Charter wrote:
>But I know you'll be excited to recall that "set" is a Cobol! instruction...

Yes, but only in the optional table handling module.

>knowing the reverence you young guys still have for it ;-)

Yeah, lets turn POVray in COSOL (COmmon Scene Oriented Language):

       IDENTIFICATION DIVISION.
       SCENE-ID. BOBBING-SPHERE-ABOVE-CHECKERED-PLANE.
       AUTHOR. PETER J. HOLZER
       ENVIRONMENT DIVISION.
       CONFIGURATON SECTION.
       SPECIAL NAMES.
           METALS IS "/usr/local/lib/povray/include/metals.inc".
           COLORS IS "/usr/local/lib/povray/include/colors.inc".
       INPUT-OUTPUT-SECTION.
           SELECT OUTPUT AS "SPHERE99.PNG"
	   ORGANIZATION PNG
           MODIFY FILENAME BY CLOCK.
       DATA DIVISION.
       01  THE-SPHERE.
       02  TYPE SPHERE.
       02  RADIUS 10.
       02  LOCATION (0, 20, 0).
       02  TEXTURE
       03  COPY METAL-C OF METALS.
       01  THE-PLANE.
       02  TYPE PLANE.
       02  NORMAL (0, 1, 0).
       02  OFFSET 0.
       02  TEXTURE
       03  TYPE CHECKER
       04  COPY RED OF COLORS.
       04  COPY GREEN OF COLORS.
       01  CAMERA.
       02  POSITION (0, 15, -30)
       02  LOOK AT (0, 15, 0).
       77  HEIGHT PIC COMP.
       ANIMATION DIVISION.
           RENDER FRAMES 0 THRU 35
           VARYING CLOCK FROM 0 THRU 350.
       RENDER DIVISION.
           APPLY ROTATION AROUND Y AXIS BY CLOCK DEGREES TO CAMERA.
           COMPUTE SINUS OF CLOCK GIVING HEIGHT.
           MULTIPLY HEIGHT BY 10 GIVING HEIGHT.
           APPLY TRANSLATION BY HEIGHT UNITS ALONG Y AXIS TO THE-SPHERE.
           RENDER IT.
           DISPLAY STATISTICS.

    SCNR,
        hp

PS: I admit that I had to dust off my old Cobol manual to write this.

-- 
   _  | Peter J. Holzer    | Nicht an Tueren mangelt es,
|_|_) | Sysadmin WSR       | sondern an der Einrichtung (aka Content).
| |   | hjp### [at] wsracat      |    -- Ale### [at] univieacat
__/   | http://www.hjp.at/ |       zum Thema Portale in at.linux


Post a reply to this message

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

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