PureBytes Links
Trading Reference Links
|
Subject:
Serious Easy Langauge Bug/Problem
Date:
Tue, 10 Aug 1999 12:18:12 -0400
From:
Andrew <andrew@xxxxxxxxx>
To:
Omega List <omega-list@xxxxxxxxxx>
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 {0}
{
You have forgot to pass the value of recent.high[0] to recent.high[1].
Infact in this way recent.high[1] is always zero, and consequently
also recent.high[5] is always zero. Counter must be = 4 DownTo 0. The
last step will be recent.high[1] = recent.high[0]
}
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 ----------
Ciao a tutti
Rodolfo
Italy
|