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

Re: Serious Easy Langauge Bug/Problem



PureBytes Links

Trading Reference Links

This block of code is just moving the 0's in positions 1 to 4 up one slot.  

> FOR Counter = 4 DownTO 1
> BEGIN
>  Recent.High[Counter+1] = Recent.High[Counter];
> END;

Counter never hits 0 to copy the value that you are setting.  So your
example #1 effectively isn't doing the following line from Example #2:

> Recent.High[1] = Recent.High[0];


Replace with this code:

> FOR Counter = 5 DownTO 1
> BEGIN
>  Recent.High[Counter] = Recent.High[Counter-1];
> END;


Hope that clears it up.

...not to say there ~aren't~ serious problems with EasyLanguage though...
;^)  In this case, it looks like you were just staring a bit too hard for a
bit too long.

It's too bad that we (I know do) so naturally/quickly come to the point
where our reaction is, "well it must be another problem with EasyLanguage".
 ;^)

At 12:18 PM 8/10/99 -0400, Andrew wrote:
>I think that I have stumbled across a very serious bug/problem with Easy
>Langauge.  It has to do
>with using Loops.  I am including two sections of code which illustrate
>the problem.  They
>should produce identical answers but they do not.  The brute force
>method works while the
>loop does not work.  If the mistake is mine, please point it out to me,
>if it is not, please correct
>this problem as soon as possible.
>
>Best regards,
>
>Andrew
>
>----------     Code Example # 1     ----------
>INPUTS:  Size(5);
>
>VARS:   Counter(0);
>
>ARRAYS:  Recent.High[5](0);
>
>IF ( High[0] = Highest( High, Size ) ) THEN
>BEGIN
> Counter = 4;
> FOR Counter = 4 DownTO 1
> BEGIN
>  Recent.High[Counter+1] = Recent.High[Counter];
> END;
> Recent.High[0] = BarNumber[0];
>END;
>
>Value1 = Recent.High[5];
>
>Plot1(BarNumber,"Bar");
>Plot2(Value1,"Val1");
>----------     Code Example # 1     ----------
>
>Code Example # 1 does not work.  The only element of the array which
>ever has a value is
>[0].  The next section of code, which is doing the same thing, just in a
>different "manual" way
>does work.  They both should work, but the loop method fails.
>
>----------     Code Example # 2     ----------
>INPUTS:  Size(5);
>
>VARS:   Counter(0);
>
>ARRAYS:  Recent.High[5](0);
>
>IF ( High[0] = Highest( High, Size ) ) THEN
>BEGIN
> Recent.High[5] = Recent.High[4];
> Recent.High[4] = Recent.High[3];
> Recent.High[3] = Recent.High[2];
> Recent.High[2] = Recent.High[1];
> Recent.High[1] = Recent.High[0];
> Recent.High[0] = BarNumber[0];
>END;
>
>Value1 = Recent.High[5];
>
>Plot1(BarNumber,"Bar");
>Plot2(Value1,"Val1");
>----------     Code Example # 2     ----------
>
>
>