i hope someone here can help me with my Problem.
well, let's specify it.
i have a procedure, in which i want to merge 2 arrays into one (length(array1)+length(array2)). BUT i do not want to put double entries, which exist already in array1 to be filled from array2 into the result array.
can anyone help me with that?
PROCEDURE Merge(array1, array2: ARRAY OF INTEGER; length1, length2: INTEGER;
VAR result: ARRAY OF INTEGER; VAR resultLength: INTEGER);
i, j, k : INTEGER;
resultCount : INTEGER;
i := 0;
j := 0;
k := 0;
resultCount := 0;
FOR i := 0 TO length1-1 DO BEGIN
result[i] := array1[i];
FOR i := 0 TO length2-1 DO BEGIN
result[i+length1] := array2[i];
resultLength := resultCount;