POV-Ray : Newsgroups : povray.general : #break for loops and macros Server Time
3 Aug 2024 04:16:29 EDT (-0400)
  #break for loops and macros (Message 1 to 3 of 3)  
From: Florian Brucker
Subject: #break for loops and macros
Date: 18 Apr 2004 11:35:41
Message: <4082a04d$1@news.povray.org>
Any chance that one will be able to exit loops and macros via #break (or 
some other command) in an upcoming POV-Ray version?

Florian


Post a reply to this message

From: Christopher James Huff
Subject: Re: #break for loops and macros
Date: 18 Apr 2004 13:01:29
Message: <cjameshuff-F19B17.13023318042004@news.povray.org>
In article <4082a04d$1@news.povray.org>,
 Florian Brucker <tor### [at] torfboldcom> wrote:

> Any chance that one will be able to exit loops and macros via #break (or 
> some other command) in an upcoming POV-Ray version?

Probably not any time soon, at least not in an official version. 
Development will probably focus more on POV 4.0 from now on, with only 
maintenance updates to 3.x. If nobody forgets and it works out, it will 
probably eventually get implemented in 4.x. In the meantime, just check 
a halting variable:

#local Stop = false;
#local J = 0;
#while(!Stop & J < 10)
    #if(rand(RS) < 0.1)
        #local Stop = true;
    #else
        #local J = J + 1;
    #end
#end

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

From: Warp
Subject: Re: #break for loops and macros
Date: 18 Apr 2004 14:21:50
Message: <4082c73e@news.povray.org>
Florian Brucker <tor### [at] torfboldcom> wrote:
> Any chance that one will be able to exit loops and macros via #break (or 
> some other command) in an upcoming POV-Ray version?

  Currently you can usually get the same effect using #ifs. The #breaks may
sometimes shorten the code a bit, but it's not such a big burder to use
the #ifs.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

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