1. exit procedure?
- Posted by Smith Ray <Ray.Smith at FUJITSU.COM.AU> Feb 23, 1999
- 506 views
Hello, I have looked through the documentation and can't find an "exit procedure" / "exit function" statement. I'm sure it doesn't exist, but thought I'd check with the experts!!!. What I'm looking for is a statement that exits the current procedure. e.g procedure process() if {some condition} then exit procedure end if ... continue processing end procedure Would anyone else like it to be implemented in Euphoria? Regards, Ray Smith
2. Re: exit procedure?
- Posted by "C. K. Lester" <cklester at TICNET.COM> Feb 22, 1999
- 439 views
- Last edited Feb 23, 1999
I think if you just use 'return' it should get you outta there. -----Original Message----- From: Smith Ray <Ray.Smith at FUJITSU.COM.AU> To: EUPHORIA at LISTSERV.MUOHIO.EDU <EUPHORIA at LISTSERV.MUOHIO.EDU> Date: Monday, February 22, 1999 4:38 PM Subject: exit procedure? >Hello, > >I have looked through the documentation and can't find an "exit procedure" ; >"exit function" statement. I'm sure it doesn't exist, but thought I'd check >with the experts!!!. > >What I'm looking for is a statement that exits the current procedure. >e.g > >procedure process() > >if {some condition} then > exit procedure >end if > >... continue processing > >end procedure > > >Would anyone else like it to be implemented in Euphoria? > >Regards, > >Ray Smith >
3. Re: exit procedure?
- Posted by Daniel Berstein <daber at PAIR.COM> Feb 22, 1999
- 458 views
- Last edited Feb 23, 1999
At 08:42 PM 22-02-1999 , you wrote: >Hello, > >I have looked through the documentation and can't find an "exit procedure" / >"exit function" statement. I'm sure it doesn't exist, but thought I'd check >with the experts!!!. > >What I'm looking for is a statement that exits the current procedure. >e.g > >procedure process() > >if {some condition} then > exit procedure >end if > >... continue processing > >end procedure Use the return statement procedure a() if condition then return end if end procedure function b() if condition then return some_value end if end function The return statement can be used on procedures given that you don't return a value. Functions are exactly the opposite, you must return a value. Regards, Daniel Berstein [daber at pair.com]