1. RE: A Euphoria wish list item (minor)
- Posted by "C. K. Lester" <cklester at yahoo.com> Feb 15, 2002
- 452 views
> > for i = 1 to 10 do > > for j = 1 to 10 do > > -- do whatever > > if some_sequence[i][j] = whatever then > > then goto nextstep > > > exit_flag = TRUE > > exit > > end if > > end for > > if exit_flag = TRUE then > > exit > > end if > > end for > > :nextstep: > > > ...wheras a nice "exit(2)" inside the j loop would do nicely... > > So does goto. I'm assuming you would not allow jumps INTO looped code.
2. RE: A Euphoria wish list item (minor)
- Posted by Bernie Ryan <xotron at localnet.com> Feb 15, 2002
- 435 views
Kat wrote: > > So does goto. > Kat: Karl made the goto available for you in his interpeter. I don't see any edvidence of you using it. Maybe you shouldn't complain that it is it's not available. Bernie
3. RE: A Euphoria wish list item (minor)
- Posted by Andy Serpa <renegade at earthling.net> Feb 15, 2002
- 436 views
Kat wrote: > On 15 Feb 2002, at 20:49, Andy Serpa wrote: > > > > > While everyone is fighting about the future of the languange, I have a > > minor suggestion that I would find quite convienient: > > > > Modify the "exit" statement so I can break out of nested loops, like the > > > > "break" statement in PHP. > > > > So "exit" would become shorthand for "exit(1)", while "exit(2)" would > > break out of two loops, "exit(3)" would break out of 3, etc... > > Ewwwwwww! > > > Currently, I have to do something like this: > > > > for i = 1 to 10 do > > for j = 1 to 10 do > > -- do whatever > > if some_sequence[i][j] = whatever then > > then goto nextstep > > > exit_flag = TRUE > > exit > > end if > > end for > > if exit_flag = TRUE then > > exit > > end if > > end for > > :nextstep: > > > ...wheras a nice "exit(2)" inside the j loop would do nicely... > > So does goto. > Actually, the only thing I'd ever use goto for is to bust out of nested loops. Other than that, I don't like it...
4. RE: A Euphoria wish list item (minor)
- Posted by Kat <gertie at PELL.NET> Feb 15, 2002
- 430 views
On 15 Feb 2002, at 22:54, C. K. Lester wrote: > > > > > for i = 1 to 10 do > > > for j = 1 to 10 do > > > -- do whatever > > > if some_sequence[i][j] = whatever then > > > > then goto nextstep > > > > > exit_flag = TRUE > > > exit > > > end if > > > end for > > > if exit_flag = TRUE then > > > exit > > > end if > > > end for > > > > :nextstep: > > > > > ...wheras a nice "exit(2)" inside the j loop would do nicely... > > > > So does goto. > > I'm assuming you would not allow jumps INTO looped code. Correct. Personally, i wouldn't. However, it should also be possible for the jump into a loop to simply ignore the end loop line and fall thru it, and not try to loop. But this would be a questionable coding style. Kat
5. RE: A Euphoria wish list item (minor)
- Posted by David Cuny <euphoria_coder at HOTMAIL.COM> Feb 15, 2002
- 443 views
Bernie wrote: >Karl made the goto available for you in his interpeter. >I don't see any evidence of you using it. Kat, I'd suggest adding something like this in the "About" window of your next application: "Kat's New Chatterbot v1.0 Now using 34 GOTO statements!" so everyone can tell. Not everyone is as adept as Bernie is about knowing what statements you use in your code. -- David Cuny
6. RE: A Euphoria wish list item (minor)
- Posted by Kat <gertie at PELL.NET> Feb 15, 2002
- 482 views
On 15 Feb 2002, at 23:41, Bernie Ryan wrote: > > > Kat wrote: > > > > So does goto. > > > > Kat: > Karl made the goto available for you in his interpeter. > I don't see any edvidence of you using it. > Maybe you shouldn't complain that it is it's not available. Excuse me, but the request was made for a change in Eu, which Robert says he won't make, so i pointed to the goto in Karl's interpreter. What evidence of the use of goto would you like to see? I won't have electricity or running water or heat tonight, but i can use the flashlight to write on paper and email it back tomorrow. Kat
7. RE: A Euphoria wish list item (minor)
- Posted by Shawn Pringle <pringle at techie.com> Feb 16, 2002
- 466 views
Java uses labeled breaks. In java loops are labeled, a "continue" like statement for Euphoria would be nice too (also using labels). So much for keeping Euphoria very simple. :) mistertrik at hotmail.com wrote: > >Modify the "exit" statement so I can break out of nested loops, like > >>the > >"break" statement in PHP. > > > >So "exit" would become shorthand for "exit(1)", while "exit(2)" would > >break out of two loops, "exit(3)" would break out of 3, etc... > > <SARCASM> > Haven't seen this request before.... > </SARCASM> > > > P.S. Hey Kat, there's some new tags for .htx > > --Mr Trick > > Regards, Shawn Pringle