I'll second that sentiment.  At first I liked the idea of the RETURN TO
and used it.  I got bit bad by the fact that this routine was called
from another routine, which means that RETURNing TO the mainline left a
return jump address on the stack ... which meant that the mainline
RETURN did *not* return to the calling program!

RETURN TO is an inherently flawed concept.  The only way to *ensure* the
stack is unwound correctly is to *always* RETURN from internal subs and
reroute after the GOSUB based on something set from within the sub.

-Keith

----Original Message----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Richard Taylor
Sent: Wednesday, October 05, 2005 6:41 AM
To: [email protected]
Subject: RE: [U2] more serious notes on GOTO

> Ross,
> 
> Please tell me you are kidding.  RETURN TO is worse than using a GOTO.
> You think you are dealing with a nice neat subroutine and then the
> 'hidden' goto in the return bites you.
> 
>> -----Original Message-----
>> From: [EMAIL PROTECTED] [mailto:owner-u2-
>> [EMAIL PROTECTED] On Behalf Of Ross Ferris
>> Sent: Wednesday, October 05, 2005 8:42 AM
>> To: [email protected]
>> Subject: RE: [U2] more serious notes on GOTO
>> 
>> Personally I prefer the RETURN TO syntax - all the 'elegance' of
>> subroutines, with the bonus of conditional exits. Now THAT was a
>> "nice innovation" in the language 
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to