All pastes #1763 Raw Edit

Anonymous

public text v1 · immutable
#1763 ·published 2004-10-28 16:07 UTC
rendered paste body
PROCEDURE make_unique(VAR lista : pekare);
VAR temp1, temp2, bort : pekare;
BEGIN
  temp1:= lista;
  REPEAT
    temp2:= temp1;
    WHILE temp2^.next <> NIL DO
    BEGIN
      IF (temp2^.next^.tal = temp1^.tal) AND (temp2^.next^.data = temp1^.data) THEN
      BEGIN
        bort := temp2^.next;
        temp2^.next := bort^.next;
        DISPOSE(bort);
      END ELSE temp2 := temp2^.next;
    END;
  temp1:= temp1^.next
  UNTIL temp1 = NIL;
END;