|
|
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
|
|