![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <39aedd8c@news.povray.org>, Warp <war### [at] tag povray org>
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] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Chris Huff <chr### [at] mac com> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp wrote:
> Chris Huff <chr### [at] mac com> 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] faricy net> ICQ 55354965
Please visit my website: http://davidf.faricy.net/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <39AF1FCD.4B0CE825@faricy.net>, David Fontaine
<dav### [at] faricy net> 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] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Chris Huff" <chr### [at] mac com> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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] faricy net> ICQ 55354965
Please visit my website: http://davidf.faricy.net/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <39B### [at] faricy net>, David Fontaine
<dav### [at] faricy net> 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] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 30 Aug 2000 09:51:17 -0400, Warp wrote:
>Peter J. Holzer <hjp### [at] sikitu wsr ac at> 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] wsr ac at | -- Ale### [at] univie ac at
__/ | http://www.hjp.at/ | zum Thema Portale in at.linux
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On Thu, 31 Aug 2000 23:20:44 -0500, Chris Huff wrote:
>In article <39AF1FCD.4B0CE825@faricy.net>, David Fontaine
><dav### [at] faricy net> 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.
Since a C for loop:
for (A; B; C) {
D;
}
is just an abbreviation for
A;
while(B) {
D;
C;
}
(well, if you ignore continue, anyway)
and we already have a while loop in Povray, that shouldn't be too hard.
>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.
Oh. I didn't notice that. Cool! I always thought that redeclaring a
variable at every assignment is somewhat inelegant.
hp
--
_ | Peter J. Holzer | Nicht an Tueren mangelt es,
|_|_) | Sysadmin WSR | sondern an der Einrichtung (aka Content).
| | | hjp### [at] wsr ac at | -- Ale### [at] univie ac at
__/ | http://www.hjp.at/ | zum Thema Portale in at.linux
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
In article <slr### [at] teal h hjp at>,
hjp### [at] SiKitu wsr ac at (Peter J. Holzer) wrote:
> Since a C for loop:
...
> is just an abbreviation for
...
> (well, if you ignore continue, anyway)
> and we already have a while loop in Povray, that shouldn't be too hard.
It might not be easy to internally convert a for loop to a while loop,
it may require a completely separate loop.
> Oh. I didn't notice that. Cool! I always thought that redeclaring a
> variable at every assignment is somewhat inelegant.
That shortcut still redeclares the variable, it is just a typing
shortcut, but I agree that it is inelegant to redeclare a variable just
to assign to it. That is the exact reason I added a #set keyword in my
patch, so you can use a separate keyword for modifying variables.
--
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |