Desperatly trying to implement an mergesort algorithm



Hello!

Im having extreme problems trying to implement an mergesort in Ada, and
was hoping from some help in this group :)

My definition of the procedure is this:

type List is array(Natural range <>) of Integer;
..
..
procedure Mergesort(A : in out List);
..
..

And for readability I've used pastebin to host my code
(http://pastebin.com/417262)

I just plain and simply can't grasp what is wrong here! Am I even
partitioning the array properly?

(The merge part isn't complete yet)

Any help is GREATLY appreciated.

.