procedure SetArrayLength(var Arr: Array; I: Longint);
Sets the length of an array. Always call SetArrayLength before accessing the elements in an array.