Re: goto's, and loops
- Posted by John Kinsey <jkinsey at BELLSOUTH.NET> Aug 08, 1999
- 523 views
Hi all, If I remember right the only place to use a goto would be in an error trapping routine where you would not want the routine to return back to the next line after the error but instead break out and give an user error then quit. Other than that I cannot think of any structured modern day programming language that promotes the use of goto's. I would say that its better programming practice to stay away from the goto keyword for both the programmer writing the program and for others that are trying to figure out what that programmer did. As far as the loops go the only difference between a while-do and repeat-until is one is pessimistic and the other is optimistic. I don't really think that this would matter one way or the other, I guess it depends on how you think. That's my 2 cents Thanks, JKinsey -----Original Message----- From: Euphoria Programming for MS-DOS [mailto:EUPHORIA at LISTSERV.MUOHIO.EDU]On Behalf Of Lewis Townsend Sent: Monday, August 02, 1999 4:19 PM To: EUPHORIA at LISTSERV.MUOHIO.EDU Subject: Re: goto's, and loops Hello, Kat wrote: >Ok, what >about "repeat-until" loops? I didn't see them in Euphoria either. It's a >"while-do" loop with the test at the end instead of the beginning. Here is Euphoria's repeat-until loop while not <expression> do end while Isn't it nice that a single construct can be used for more than 1 job. I always thought that BASIC's do_until loop was redundant. later, Lewis Townsend _______________________________________________________________ Get Free Email and Do More On The Web. Visit http://www.msn.com