Re: break/continue - newbe

2004-12-21 Thread John Machin
Ann wrote: > I have trouble sometimes figuring out where > break and continue go to. Is there some easy > way to figure it out, or a tool? > TIA > Ann You need a tool called py2ftn. It would convert a sequence of statements like: while 1: blah1 if cond1: break blah2 if cond2: continue blah3 to:

Re: break/continue - newbe

2004-12-21 Thread John Machin
Ann wrote: > I have trouble sometimes figuring out where > break and continue go to. Is there some easy > way to figure it out, or a tool? > TIA > Ann You need a tool called py2ftn. It would convert statements like "if a > b: break" to e.g. "IF(A.GT.B)GOTO12345". A longer example; this: while 1

Re: break/continue - newbe

2004-12-21 Thread Fredrik Lundh
"Ann" <[EMAIL PROTECTED]> wrote: > Thanks Jeff, that solves my problem. BTW: is there an easy way to > break/continue out more than one level? not really; to continue more than one level, you have to break out of the inner loop, and make sure the logic in that loop body brings you back to the top

Re: break/continue - newbe

2004-12-21 Thread Ann
"Jeff Shannon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Ann wrote: > > >I have trouble sometimes figuring out where > >break and continue go to. Is there some easy > >way to figure it out, or a tool? > > > > > > Break and continue always operate on the most-nested loop that's

Re: break/continue - newbe

2004-12-21 Thread Jeff Shannon
Ann wrote: I have trouble sometimes figuring out where break and continue go to. Is there some easy way to figure it out, or a tool? Break and continue always operate on the most-nested loop that's currently executing. To show an example, let's add some line numbers to some code... 1) while

break/continue - newbe

2004-12-21 Thread Ann
I have trouble sometimes figuring out where break and continue go to. Is there some easy way to figure it out, or a tool? TIA Ann -- http://mail.python.org/mailman/listinfo/python-list