[Pythonmac-SIG] Really need a "GOTO"!

Robin B. Lake rbl@hal.cwru.edu
Sat, 20 May 2000 19:49:42 -0400 (EDT)


I've got a program almost working, but --- being trained in programming
well before "GOTO"s were considered harmful ---  I need some help in
seeing how to change my "natural" code-construction tendancies.

Here's the structure:

Do something A
while 1:
  if a line contains a string:
	do a bunch of stuff
  else:
    if a line contains a different string:
      Do something B
====
At this point, if I follow Do something B with:

      Do something B
  continue

then embedded print statements show I don't got back to the start of the 
"while 1" loop, but just hang.  From the documentation, using a "break" 
here won't take me to the start of the "while 1:" loop.  

If I try:

      Do something B
continue

then I get a syntax error.

Help, please?

Thank you,
Rob Lake
rbl@hal.cwru.edu