POV-Ray : Newsgroups : povray.general : The Language of POV-Ray : Re: The Language of POV-Ray Server Time
10 Aug 2024 09:16:02 EDT (-0400)
  Re: The Language of POV-Ray  
From: PoD
Date: 9 Mar 2000 13:21:21
Message: <38C7EF5B.254A68D8@merlin.net.au>
Nieminen Juha wrote:
> 
> PoD <pod### [at] globalfreewaycomau> wrote:
> :   for( I=1; I <= 5; I=I+1){...}
> 
>   I think that a more povray-type syntax would be:
> 
> #for(I=1; I<=5; I++)
>   ...
> #end
> 
>   Of course this can be done with a #while-loop, but this kind of shortcut
> just makes life easier.
>   I would also like to see this:
> 
> #do
>   ...
> #until(whatever)
> 
>   I have at least once needed this kind of feature. With the regular #while
> loop I had to write the body of the loop twice.
> 
>   And this I have suggested before:
> 
> #declare A += B;
> #declare A -= B;
> #declare A *= B;
> #declare A /= B;
> etc...
> 
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/

I DON'T like the Basic syntax but it's still lots simpler than POV.
I also deliberately didn't use I++ because that has nothing to do with
loop syntax and might confuse people who've never seen C, Java etc.

PoD.


Post a reply to this message

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