hi,
   我是DELPHI初学者, 我有问题想请教. 代码如下:

  Procedure DiscoverSomethingInteresting(Input : Array Of Integer; Out x, y, z : Integer);
            Var
                   i, j, k : Integer;
                  w : Integer;
           Begin
                  z := -MaxInt;
                 For i := 1 To Length(Input) Do
                    Begin
                      For j := 0 To Length(Input) - i Do
                        Begin
                            w := 0;
                            For k := 0 To i - 1 Do
                               Begin
                                   w := w + Input[j+k];
                               End;
                                    If w > z Then
                               Begin
                                     z := w;
                                     x := j;
                                     y := j+i-1;
                               End;
                         End;
                    End;
              End;

问题:  1. 以上的代码, 有逻辑上的错误吗?
           2.  从上面的代码, 可以说明, array有什么有趣的特性(相对于其它的语言).