Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!bronze!venus.iucf.indiana.edu!graham From: graham@venus.iucf.indiana.edu (JIM GRAHAM) Newsgroups: comp.sys.amiga.programmer Subject: Re: AREXX Question. How To Goto. Message-ID: <1991Jan20.200834.25560@bronze.ucs.indiana.edu> Date: 20 Jan 91 20:51:31 GMT References: <16433@venera.isi.edu> Sender: news@bronze.ucs.indiana.edu (USENET News System) Reply-To: graham@venus.iucf.indiana.edu Distribution: na Organization: Indiana University Cyclotron Facility, Bloomington, Indiana Lines: 56 News-Software: VAX/VMS VNEWS 1.3-4 In article <16433@venera.isi.edu>, schur@isi.edu (Sean Schur) writes... >I would like to know what works as a "goto" statement in AREXX. >I noticed that you can "label" any point in the program with the >command - > >label: > >But once you've labeled that point, how do you tell the program to >go to that point? Is this the way to do a "goto" or am I way off base? >If I am, I would appreciate it if someone could steer me in the >right direction. > use the call statement. Suppose you have a section labeled "goober:" The way to "go" there is: call goober At the end of the block labeled goober: insert the statement "return". This takes you back to the point from which goober: was called. For example: --------------------------cut here----------------------------------- /* Test script. Tests call to a label and return from the label. */ say "You're here..." call goober say "You're back!" exit goober: say "Howdy-doody, goober here!" return ---------------------------------------------------------------------- It's that simple. -Jim -> ->Disclaimer: I'm not ashamed of what I say. <- <- Sorry if the above disclaimer is too long. ______________________________________________________________________ | Internet: graham@venus.iucf.indiana.edu | | UUCP: dolmen!graham@iuvax.cs.indiana.edu | | FIDO: Soon! | | BBS: The PORTAL DOLMEN BBS/ParaNet ALPHA-GAMMA (sm) (9:1012/13) | | (812) 334-0418, 24hrs. | |______________________________________________________________________|