TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Bill Hemenway
from: Russ Williams
date: 1995-01-15 15:37:00
subject: Goto

Bill Hemenway wrote the following to All on 01-14-1995 regarding GOTO:

BH> Is there something like labels and goto in rexx?

Sort of -- Rexx has labels, which are written as the first thing on a
line and followed by a colon, e.g.
  ThisPlace:  
A statement can be written on the same line to the right of the label.

The SIGNAL command in some ways acts as a Goto; however, it clears all
active pending control groups (DO loops, IF constructs, etc.) so it is
best to use it only to "bail out" in error situations.

Rexx has a good set of structured commands, so you can usually avoid
any need for a Goto.  The CALL command should also not be overlooked; I
frequently put the following sort of thing in my Rexx programs:
  If error_occurred Then Call Error "Error Message"
  . . .
  Error: Say Arg(1)
    Exit
The EXIT command will exit the Rexx program even though it is "inside
a subroutine" in this situation.  
                                                                           
                                   
___ Russ Williams ---
--- Green Valley, AZ ---

---
 X KWQ/2 1.2i X Everyone is entitled to my opinion.

--- Maximus/2 2.02
* Origin: The Emerald Isle, Tucson, Az. (602) 749-8638 (1:300/14)
SEEN-BY: 12/2442 620/243 624/50 632/348 640/820 690/660 711/409 410 413 430
SEEN-BY: 711/807 808 809 934 942 949 712/353 515 713/888 800/1 7877/2809
@PATH: 300/14 35 603 3615/50 229/2 12/2442 711/409 808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.