PureBytes Links
Trading Reference Links
|
I am having the same problem, I change the value of a variable when
the trgger is true but the variable is always unchanged outside the
trigger code. I checked with the debugger, and there the variable is
appears changed
here is the sample code
j[0]=0;
trig=ParamTrigger("trigger","this");
if (trig)
{
for (i=1;i<=100;i++)
{
j[i]=i^2+1;
//printf("\nl j="+j[i]);
}
}
for (i=1;i<=10;i++)
{
printf("\nl j="+j[i]);
}
Basically there is never output, neither J outside the trigger {} is
changed.
Removing the trigger // if(trigger) , I can see J printed and changed
even outside the {}.
Any solution?
thank
Ly
--- In amibroker@xxxxxxxxxxxxxxx, "Edward Pottasch" <empottasch@xxx>
wrote:
>
> hi,
>
> thanks for your reply. No it seems that when calling the procedure
via a trigger does execute the procedure but does not display any
output. I can easily show that if I put an error in the procedure it
will find the error. So it executes just does not display the output.
>
> For now I just skip the trigger button.
>
> Still reading through your message in the beta group. Will repond later,
>
> regards, Ed
>
>
> ----- Original Message -----
> From: vlanschot
> To: amibroker@xxxxxxxxxxxxxxx
> Sent: Thursday, May 10, 2007 3:55 PM
> Subject: [amibroker] Re: interpretation window, no output
>
>
> Perhaps because you actually do not call the procedure? Did you try
> changing it into
>
> . . . .
>
> if(exec) {
> y = ts_proc(); }
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Edward Pottasch" <empottasch@>
> wrote:
> >
> > hi,
> >
> > this little piece of code displays output to the Interpretation
> window:
> >
> > for(i = 1; i < 1000; i *= 2 )
> > {
> > if( i > 50 ) break;
> > printf("%f\n", i );
> > }
> >
> > SetChartOptions(0, chartShowDates);
> > GraphXSpace = 5;
> > Plot(C,"C",1,64)
> >
> > output looks like:
> >
> > 1.000000
> > 2.000000
> > 4.000000
> > 8.000000
> > 16.000000
> > 32.000000
> >
> > However, the code below has the same output generator put into a
> procedure but does not display the output when this procedure is
> triggered:
> >
> > procedure ts_proc() {
> >
> > for(i = 1; i < 1000; i *= 2 )
> > {
> > if( i > 50 ) break;
> > printf("%f\n", i );
> > }
> >
> > }
> >
> > exec = ParamTrigger("exec", "Display Output");
> > if(exec) {
> >
> > ts_proc();
> >
> > }
> >
> > SetChartOptions(0, chartShowDates);
> > GraphXSpace = 5;
> > Plot(C,"C",1,64)
> >
> >
> > I can see that the procedure is definitely executed only there is
> no output generated. Is this normal?
> >
> > thanks, Ed
> >
>
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/
|