POV-Ray : Newsgroups : povray.general : POV Parsing Server Time
9 Aug 2024 15:25:48 EDT (-0400)
  POV Parsing (Message 31 to 40 of 52)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: David Fontaine
Subject: Re: POV Parsing
Date: 31 Aug 2000 15:27:06
Message: <39AEAF4C.9F410DAC@faricy.net>
Chris Huff wrote:

> Oh...I always called those "flow control keywords". I've never heard
> them called "control aids"...
> And I agree about goto, I have never used it. In fact, I barely ever use
> "break" outside of a switch statement...I think the first time was just
> yesterday, in the #set patch...and even there I considered using a while
> loop instead.

Yup...

> I don't recognize some of those keywords(elseif, endif, call, teehee),
> are they from a BASIC variant?

Yup, in BASIC you use endif to end an if and elseif instead of
else-if-endif, and call calls a function. BASIC is kinda stupid anyway...

> Hmm, the POV-Script list would be:
> #while, #if, #else, #switch, #case, #range, #macro, #end, #break...did I
> miss any?
> Oh, #include, I guess...and MegaPOV functions.

I suppose in POV #include can redirect flow like anything else, but not in
C.

--
David Fontaine   <dav### [at] faricynet>   ICQ 55354965
Please visit my website:  http://davidf.faricy.net/


Post a reply to this message

From: Warp
Subject: Re: POV Parsing
Date: 31 Aug 2000 18:34:52
Message: <39aedd8c@news.povray.org>
Chris Huff <chr### [at] maccom> wrote:
: miss any?

  ?:

-- 
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: POV Parsing
Date: 31 Aug 2000 19:36:13
Message: <chrishuff-CAD5D9.18374931082000@news.povray.org>
In article <39aedd8c@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

>   ?:

Yuck.
I did't think this was supported by POV, but I found a reference in the 
documentation(though it took searching for all ? marks...). Oh, 
well...it might be considered equivalent to the #if-#else-#end group, or 
it might be considered a separate one.

-- 
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: POV Parsing
Date: 31 Aug 2000 22:38:57
Message: <39af16c1@news.povray.org>
Chris Huff <chr### [at] maccom> wrote:
:>   ?:

: Yuck.
: I did't think this was supported by POV

  Even a very advanced user doesn't know every single feature of povray :)

-- 
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: David Fontaine
Subject: Re: POV Parsing
Date: 31 Aug 2000 23:27:05
Message: <39AF1FCD.4B0CE825@faricy.net>
Warp wrote:

> Chris Huff <chr### [at] maccom> wrote:
> : miss any?
>
>   ?:

Yup! Now why would they put that in POV but not things like +=, -=, *=, /=,
++, --? And where's the stinkin' #for? :)
Will 3.5 have operators instead of functions for modulo and/or powers?

--
David Fontaine   <dav### [at] faricynet>   ICQ 55354965
Please visit my website:  http://davidf.faricy.net/


Post a reply to this message

From: Chris Huff
Subject: Re: POV Parsing
Date: 1 Sep 2000 00:19:09
Message: <chrishuff-AA06DF.23204431082000@news.povray.org>
In article <39AF1FCD.4B0CE825@faricy.net>, David Fontaine 
<dav### [at] faricynet> wrote:

> Yup! Now why would they put that in POV but not things like +=, -=, 
> *=, /=, ++, --?

Don't ask me...though I will look to see how difficult it would be to 
add them.


> And where's the stinkin' #for? :)

Now, *this* I have no idea how to implement, though I would use a 
C/Java-like syntax instead of the BASIC-like syntax.


> Will 3.5 have operators instead of functions for modulo and/or powers?

Unknown. I have written a patch which adds a ^ operator for 
exponentiation, but it may not be included. The modulo operator would be 
just as easy...but the best operator to use for it would be %, and that 
is already used in MegaPOV as a shortcut for #local. Both of these 
operators are useable in functions, however.

-- 
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: Bob Hughes
Subject: Re: POV Parsing
Date: 1 Sep 2000 02:24:39
Message: <39af4ba7@news.povray.org>
"Chris Huff" <chr### [at] maccom> wrote in message
news:chrishuff-BA3801.11085731082000@news.povray.org...
| Hmm, the POV-Script list would be:
| #while, #if, #else, #switch, #case, #range, #macro, #end, #break...did I
| miss any?
| Oh, #include, I guess...and MegaPOV functions.

Also #ifdef, #ifndef.

That's all the Conditional Directives I think.    #else, #end, #case, #break
aren't actually "conditional" I guess.

In the Doc it lists Language Directives like this:

#break #case #debug #declare
#default #else #end #fclose
#fopen #local #macro #read
#render #statistics #switch #undef
#version #warning #write

#error is mentioned elsewhere and yet not shown in the list.  Maybe a
mistake in the Doc, it's called "Fatal" in the Text Stream section.

Bob


Post a reply to this message

From: David Fontaine
Subject: Re: POV Parsing
Date: 2 Sep 2000 03:52:53
Message: <39B0AF91.5F1864F@faricy.net>
Chris Huff wrote:

> > And where's the stinkin' #for? :)
>
> Now, *this* I have no idea how to implement, though I would use a
> C/Java-like syntax instead of the BASIC-like syntax.

From a preprocessor perspective,
   #for(init, test, increment)
      ...
   #end
would be changed to
   init
   #while (test)
      ...
      increment
   #end
but I don't know how easily that applies to POV parsing, probably not at
all.

> Unknown. I have written a patch which adds a ^ operator for
> exponentiation, but it may not be included. The modulo operator would be
> just as easy...but the best operator to use for it would be %, and that
> is already used in MegaPOV as a shortcut for #local. Both of these
> operators are useable in functions, however.

Yeah! No typing '#local' anymore! I'll probably do it anyway...

--
David Fontaine   <dav### [at] faricynet>   ICQ 55354965
Please visit my website:  http://davidf.faricy.net/


Post a reply to this message

From: Chris Huff
Subject: Re: POV Parsing
Date: 2 Sep 2000 14:03:44
Message: <chrishuff-230BA8.13052102092000@news.povray.org>
In article <39B### [at] faricynet>, David Fontaine 
<dav### [at] faricynet> wrote:

> From a preprocessor perspective,
>    #for(init, test, increment)
>       ...
>    #end
> would be changed to
>    init
>    #while (test)
>       ...
>       increment
>    #end
> but I don't know how easily that applies to POV parsing, probably not at
> all.

I don't think it would be very easy, if at all possible, to convert a 
#for loop to a #while loop. It would probably be best to implement a 
completely separate loop. However, I don't know that part of the 
source(yet), so I could easily be wrong.


> Yeah! No typing '#local' anymore! I'll probably do it anyway...

Do what? Type #local?
BTW, those shortcuts won't make it into 3.5, since they don't work quite 
right, so maybe % *can* eventually be used as a modulus operator.

-- 
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: POV Parsing
Date: 3 Sep 2000 10:00:38
Message: <slrn8r4kp7.g94.hjp-usenet@teal.h.hjp.at>
On 30 Aug 2000 09:51:17 -0400, Warp wrote:
>Peter J. Holzer <hjp### [at] sikituwsracat> wrote:
>: Indeed. If you compute this with standard 32 bit integer arithmetic, the
>: result is 925. Probably not what you had in mind. 
>
>  I didn't check if the values would fit into a 32-bit integer, but you get
>the idea.
>  And if integers are ever implemented in povray, there should be a very long
>integer type (at least 64 bits) anyways :)

In which case the space advantage of integers would vanish. 
They would only have a slight accuracy advantage (63 instead of 53 bits
"mantissa"). The speed difference is probably negligible.

I really don't see any advantage in introducing integers in povray. 

	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

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

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