Re: Still stuck in an infinite loop
- Posted by Euman <euman at bellsouth.net> May 18, 2001
- 374 views
How many loops (while and for)? Try to use FLUSH( ) but contain it to only running once with an if statement like this: integer run_once, fn run_once = 0 fn = open("logfile", "w") -- inside your loops for x = 1 to length(something) do *or* while true do if not run_once then puts(fn, "Im in _blank_ procedure") flush(fn) -- This forces "Im in _blank_ procedure" -- into "logfile" on disk. run_once = 1 -- make sure to do this only once.... end if end for *or* while Make sure that each "Im in _blank_ procedure" that _blank_ is a unique name so you can track down the nasty loop....... Useing this routine you'll only need to do this once because the last line in "logfile" will tell you where your problem area is. Sure this will take a few minutes to do, but it will work. First, I suggest renameing the original .ex or .exw as looptst.ex or .exw so you can save your work and come back to it later without spending extra time takeing all of the routines to track the problem down out. run looptst.ex or .exw after rebooting your machine for the last time look at "logfile" what procedure does it point to? FIX IT! Hope this helps! Euman ----- Original Message ----- From: <dstanger at belco.bc.ca> To: "EUforum" <EUforum at topica.com> Sent: Thursday, May 17, 2001 09:45 Subject: Still stuck in an infinite loop > > > Hello again, > > Well, Ctrl + C did nothing and we have established that Ctrl + Break > overruns the computers memory. I still have no way to exit a Euphoria > program without it ending on its own. I am working on a program with several > loops in it and I am a very green novice so I am risking a crash (Having to > press ctrl + break) each time I run the program after adding or changing > code. Any more ideas on how to exit a program in mid stride? > > Thanks, > David > > > > >