Re: Euphoria features
- Posted by Greg Phillips <i.shoot at REDNECKS.COM> Nov 15, 1999
- 619 views
That reminds me of a feature I wouldn't mind seeing: flag() Not necessary, of course, but nice to have. example: procedure test() puts(1,"test") flag(hey) end procedure test() if flag(hey) = 1 then do ... end if Of course, the same thing could be accomplished with a simple 'flag = 1', but then you could run into scope problems. Greg Phillips Everett Williams wrote: > On Mon, 15 Nov 1999 08:59:35 +0000, nieuwen at XS4ALL.NL wrote: > > >Lucius, goto's _are_ effective .. > >One out of 10, maybe 15 algorithms I use, depends on flag variables to jump > >out of multiple > >levels of a loop. Now that's messy. > > > > >Ralf Nieuwenhuijsen > > Ralf, > > Those flag variables, if named something explanatory provide status > information that is most valuable, specifically in debugging or influencing > the code to be performed at the target of the goto. My favorite is a > depth variable for recursive code. The other problem with goto, is that it > is a tailless kite. It provides no pointer to it's source once it gets where > it is going. I suspect that because of the violence done to block structures > and the loss of state information(currently, in Euphoria, you are always > in the main line, or in a procedure or function stack that leads back to > the main line), the overhead alone will prevent the use of goto's if > Robert is foolish enough to resurrect this long-dead canard for those > who haven't learned how to structure their logic yet. By the way, > routine_id() with call...call_back is a goto with many of the same effects. > > Everett L.(Rett) Williams > rett at gvtc.com