Re: New "maxstatements" feature suggestion
- Posted by Alan Oxley <fizzpop at axxess.co.za> Jun 08, 2007
- 653 views
Bernie Ryan wrote: > Alan: > > Simply put a constant at the top of your program. > > constant > MAXLOOP = 10 > integer ctr > > Then when you have a loop that your concern about > put a test to exit or abort(). > > if MaxLoop = ctr then exit else ctr += 1 end if > True, this can be done. But to be safe, it would have to be coded wherever you suspect there might be a problem. And in the other places that you didn't suspect? Or put it in *every* loop? I admit I'm lazy. Why not get the language to help me out with a builtin. As Pete says there will be overhead though; so why not have it as an optional like "with profile" "with type_check" "with trace"? These also have overhead but you turn them off when convenient. Regards Alan