Re: WISHLIST.TXT
- Posted by "C. K. Lester" <cklester at yahoo.com> Aug 23, 2002
- 408 views
> :restartloop: > -- initvars > for loop = 1 to something do > --code > if whatever1 then goto restartloop end if > if whatever2 then goto endloop end if > if whatever3 then goto resumeloop end if > --code > :resumeloop: > -- possible code > end for > :endloop: I've never gotten involved in any arguments regarding goto because I really don't care. I don't use them... wouldn't use them... etc... But, I don't care if they're part of the language, as long as code without gotos doesn't suffer. Kat, my question is, would there be some extra garbage collection required if you jump out of a loop that hasn't completed? In your example above, when whatever2 is true, would the interpreter know that you've exited the loop and will never return? Does the interpreter even need to know that? I'm just thinking that stuff would be left hanging, and that doesn't seem very efficient to me unless the interpreter is smart enough to know where you've gone and what you've left undone. Just curious, ck