[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: to stop the run of the code



PureBytes Links

Trading Reference Links

Thank you Ed for your help.

I did not find the help documentation concerning break, not easy as
the word break appears often in the domain of technical analysis.

Anyway, my poor programming knowlegde comes from VBA, so step by step
and stop are missing me. Probably it's useless with more practice

without break, I get that :
[1632] n1= 0
[1632] n1= 1
[1632] n1= 2
[1632] n1= 3
[1632] n1= 4
[1632] n2= 5
[1632] n2= 6
[1632] n2= 7
[1632] n2= 8
[1632] n2= 9

with a break, this :
[1632] n1= 0
[1632] n2= 5
[1632] n2= 6
[1632] n2= 7
[1632] n2= 8
[1632] n2= 9

I wish :
[1632] n1= 0

for( n = 0; n < 5; n++ )
{
    SinePlotter( n/2+Cum(0.01), n );
_TRACE("n1= " + n);
break;
}

for( n = 5; n < 10; n++ )
{
  SinePlotter( n/2+Cum(0.01), n );
_TRACE("n2= "+ n);
}

What I would like is a real stop even out of a loop. Does it exist in
the Ami world ?

Your answer to KBH about sub is helpful.

Regards


--- In amibroker@xxxxxxxxxxxxxxx, "Ed Hoopes" <reefbreak_sd@xxx> wrote:
>
> To stop code caught in an infinite loop try Shift+Break on the keyboard 
> 
> To stop  execution in the code stream use Break; It is covered in the
> Help file. 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "reinsley" <reinsley@> wrote:
> >
> > I'am looking for a way to stop the code running.
> > I saw break/continue statement for loop, unfortunately the links are
> > broken.
> > 
> > http://www.amibroker.com/guide/v50/keyword/break.html
> > http://www.amibroker.com/guide/v50/keyword/continue.html
> > 
> > Does it exist the equivalent statement to stop the code at a specific
> > point ?
> > If not, any trick to do it ?
> > 
> > Thanks
> >
>



------------------------------------

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/