Carrie

If you are in the debugger, then the easy way to break an infinite loop is
to generate an error in the  code by changing the data type of one of your
variables.

As an example, if your loop is in a for / next structure, right clck on the
incremental variable on the variables window, and change its value to a
string.  This will create an error and stop the execution  of the code

Not an elegant way of solving the problem, but it works.

Cheers


On Mon, Apr 18, 2011 at 6:18 PM, Carrie Hobbs
<[email protected]>wrote:

>
>
> Thanks for the suggestion, but I’m looking for a way to break out of the
> infinite loop after the code has started running.  I don’t think I can
> change the code after it has started running.  The only way I know how is to
> close all of Maptitude with the task manager.
>
>
>
> * *
>
> *Carrie Hobbs
> *Senior Technical Consultant
> __________________________________________________
> *B**EGHOU** C**ONSULTING, **I**NC.*
> 2200 Powell Street, Suite 460, Emeryville, CA 94608
> T: 510-597-7500 x213  |  F: 510-597-7501
>
>
>
> *From:* [email protected] [mailto:[email protected]] *On
> Behalf Of *[email protected]
> *Sent:* Monday, April 18, 2011 12:31 PM
> *To:* [email protected]
> *Subject:* [Maptitude] Re: Interrupt Infinite Loop
>
>
>
>
>
> Hi:
>
>
> In general you could use "error handling" to try to catch such cases. There
> is a topic on the subject in the Online Help.
>
>
> Maptitude Mapping Software <http://www.caliper.com>  Group Moderator
>
>
>
> --- In [email protected], "hobbsies2" <chobbs@...> wrote:
> >
> >
> > I was actually looking for a solution for when I am testing new code that
> accidentally has an infinite loop.
> >
> > However, I didn't know about the progress bar feature. I'll definitely
> look into adding that in for some of my longer code.
> >
> >
> > --- In [email protected], "dr_haspel" mhaspel@ wrote:
> > >
> > >
> > >
> > > Have you tried including a progress bar in the loop? The
> CreateProgressBar() command allows inclusion of a "cancel" button on the
> progress bar.
> > >
> > >
> > >
> > > --- In [email protected], "hobbsies2" <chobbs@> wrote:
> > > >
> > > > Does anyone know of a way to break out of the GISDK code while it is
> stuck in an infinite loop? Currently I've been using the task manager to end
> the Maptitude process, but it would be nice if there was a way that did not
> involve closing out of Maptitude.
> > > >
> > > > Thanks,
> > > > Carrie
> > > >
> > >
> >
>
>  
>



-- 
Armando Scalise

Reply via email to