can someone please answer me the follwing question for the delphi code...im a VB.net expert but nill to delphi.
here it is
[b]1) What interesting property of the input array is the routine below attempting to discover?
2) Do you believe there are any logical errors in the routine below?
3) What problems, if any, would you anticipate if this routine was deployed in a commercial application?
4) Re-implement this routine in a form you would be happy to put your name to. Any language is acceptable for this task.
here is the code
Procedure DiscoverSomethingInteresting(Input : Array Of Integer; Out x, y, z : Integer);
i, j, k : Integer;
w : Integer;
z := -MaxInt;
For i := 1 To Length(Input) Do
For j := 0 To Length(Input) - i Do
w := 0;
For k := 0 To i - 1 Do
w := w + Input[j+k];
If w > z Then
z := w;
x := j;
y := j+i-1;
[b]Notes [/b]: The sample above is written in the Delphi language. The array is zero based and the Length function returns the number of elements in the array.